diff --git a/components/gfx/font_cache_thread.rs b/components/gfx/font_cache_thread.rs index aaa5f629d13..9f09082ab44 100644 --- a/components/gfx/font_cache_thread.rs +++ b/components/gfx/font_cache_thread.rs @@ -491,6 +491,7 @@ impl FontCacheThread { // TODO: Allow users to specify these. let generic_fonts = populate_generic_fonts(); + #[allow(clippy::default_constructed_unit_structs)] let mut cache = FontCache { port, channel_to_self, diff --git a/components/gfx/font_context.rs b/components/gfx/font_context.rs index 2febda51d78..7c379f72b26 100644 --- a/components/gfx/font_context.rs +++ b/components/gfx/font_context.rs @@ -65,6 +65,7 @@ pub struct FontContext { impl FontContext { pub fn new(font_source: S) -> FontContext { + #[allow(clippy::default_constructed_unit_structs)] let handle = FontContextHandle::default(); FontContext { platform_handle: handle, diff --git a/components/script/dom/bindings/buffer_source.rs b/components/script/dom/bindings/buffer_source.rs index dd78186aee9..0549ed9041d 100644 --- a/components/script/dom/bindings/buffer_source.rs +++ b/components/script/dom/bindings/buffer_source.rs @@ -77,7 +77,7 @@ where let heap_buffer_source = match init { HeapTypedArrayInit::Buffer(buffer_source) => HeapBufferSource { buffer_source, - phantom: PhantomData::default(), + phantom: PhantomData, }, HeapTypedArrayInit::Info { len, cx } => { rooted!(in (*cx) let mut array = ptr::null_mut::()); @@ -125,7 +125,7 @@ where pub fn default() -> HeapBufferSource { HeapBufferSource { buffer_source: BufferSource::Default(Box::new(Heap::default())), - phantom: PhantomData::default(), + phantom: PhantomData, } } @@ -436,7 +436,7 @@ where HeapBufferSource { buffer_source: BufferSource::ArrayBuffer(Heap::boxed(*array_buffer)), - phantom: PhantomData::default(), + phantom: PhantomData, } } }