Remove almost all uses of Heap::new.

This commit is contained in:
Josh Matthews 2017-05-26 10:47:09 -04:00
parent f5eb8445b0
commit 77b3e911c1
4 changed files with 17 additions and 9 deletions

View file

@ -340,12 +340,12 @@ impl TestBindingMethods for TestBinding {
fn ReceiveNullableSequence(&self) -> Option<Vec<i32>> { Some(vec![1]) }
fn ReceiveTestDictionaryWithSuccessOnKeyword(&self) -> RootedTraceableBox<TestDictionary> {
RootedTraceableBox::new(TestDictionary {
anyValue: Heap::new(NullValue()),
anyValue: Heap::default(),
booleanValue: None,
byteValue: None,
dict: RootedTraceableBox::new(TestDictionaryDefaults {
UnrestrictedDoubleValue: 0.0,
anyValue: Heap::new(NullValue()),
anyValue: Heap::default(),
booleanValue: false,
bytestringValue: ByteString::new(vec![]),
byteValue: 0,
@ -361,7 +361,7 @@ impl TestBindingMethods for TestBinding {
nullableFloatValue: None,
nullableLongLongValue: None,
nullableLongValue: None,
nullableObjectValue: Heap::new(ptr::null_mut()),
nullableObjectValue: Heap::default(),
nullableOctetValue: None,
nullableShortValue: None,
nullableStringValue: None,