diff options
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); |