diff options
author | Corey Farwell <coreyf@rwell.org> | 2015-11-11 22:12:56 -0500 |
---|---|---|
committer | Corey Farwell <coreyf@rwell.org> | 2015-11-11 22:12:56 -0500 |
commit | 00fa3b2f85fde78f7af8e4636ee7b55a9aecc28d (patch) | |
tree | 8f263e1519958de6bc0f2fd39bd3fe5cabdd7c7b /components/util/str.rs | |
parent | 49d48a8680003267f29ebf8cd47c244b07f4c4d2 (diff) | |
download | servo-00fa3b2f85fde78f7af8e4636ee7b55a9aecc28d.tar.gz servo-00fa3b2f85fde78f7af8e4636ee7b55a9aecc28d.zip |
Implement Default trait for DOMString
Diffstat (limited to 'components/util/str.rs')
-rw-r--r-- | components/util/str.rs | 6 |
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; |