diff options
author | Josh Matthews <josh@joshmatthews.net> | 2017-05-26 13:46:13 -0400 |
---|---|---|
committer | Josh Matthews <josh@joshmatthews.net> | 2017-09-25 16:10:58 -0400 |
commit | 16166d66731d7040a91ddbed6ffd05d4fc64c97b (patch) | |
tree | b1c20d92de7a3cc5a87e2d1c6ebfefa6a872c84d /components/script/dom/bindings/str.rs | |
parent | b169689f32db6d497b04f3a5b173cba4acd33e93 (diff) | |
download | servo-16166d66731d7040a91ddbed6ffd05d4fc64c97b.tar.gz servo-16166d66731d7040a91ddbed6ffd05d4fc64c97b.zip |
Derive the Default trait for dictionaries containing GC values.
Diffstat (limited to 'components/script/dom/bindings/str.rs')
-rw-r--r-- | components/script/dom/bindings/str.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/components/script/dom/bindings/str.rs b/components/script/dom/bindings/str.rs index ea0b4f529b0..b665b64da8a 100644 --- a/components/script/dom/bindings/str.rs +++ b/components/script/dom/bindings/str.rs @@ -9,6 +9,7 @@ use html5ever::{LocalName, Namespace}; use servo_atoms::Atom; use std::ascii::AsciiExt; use std::borrow::{Borrow, Cow, ToOwned}; +use std::default::Default; use std::fmt; use std::hash::{Hash, Hasher}; use std::marker::PhantomData; @@ -18,7 +19,7 @@ use std::str; use std::str::{Bytes, FromStr}; /// Encapsulates the IDL `ByteString` type. -#[derive(Clone, Debug, Eq, HeapSizeOf, JSTraceable, PartialEq)] +#[derive(Clone, Debug, Default, Eq, HeapSizeOf, JSTraceable, PartialEq)] pub struct ByteString(Vec<u8>); impl ByteString { @@ -77,7 +78,7 @@ impl ops::Deref for ByteString { /// A string that is constructed from a UCS-2 buffer by replacing invalid code /// points with the replacement character. -#[derive(Clone, HeapSizeOf)] +#[derive(Clone, Default, HeapSizeOf)] pub struct USVString(pub String); |