mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Derive the Default trait for dictionaries containing GC values.
This commit is contained in:
parent
b169689f32
commit
16166d6673
6 changed files with 49 additions and 7 deletions
|
@ -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);
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue