aboutsummaryrefslogtreecommitdiffstats
path: root/components/util/str.rs
diff options
context:
space:
mode:
authorCorey Farwell <coreyf@rwell.org>2015-11-11 22:12:56 -0500
committerCorey Farwell <coreyf@rwell.org>2015-11-11 22:12:56 -0500
commit00fa3b2f85fde78f7af8e4636ee7b55a9aecc28d (patch)
tree8f263e1519958de6bc0f2fd39bd3fe5cabdd7c7b /components/util/str.rs
parent49d48a8680003267f29ebf8cd47c244b07f4c4d2 (diff)
downloadservo-00fa3b2f85fde78f7af8e4636ee7b55a9aecc28d.tar.gz
servo-00fa3b2f85fde78f7af8e4636ee7b55a9aecc28d.zip
Implement Default trait for DOMString
Diffstat (limited to 'components/util/str.rs')
-rw-r--r--components/util/str.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/components/util/str.rs b/components/util/str.rs
index 80e5fb04d6c..2d6f17ffd19 100644
--- a/components/util/str.rs
+++ b/components/util/str.rs
@@ -24,6 +24,12 @@ impl DOMString {
}
}
+impl Default for DOMString {
+ fn default() -> Self {
+ DOMString(String::new())
+ }
+}
+
impl Deref for DOMString {
type Target = str;