diff --git a/components/gfx/platform/macos/font_context.rs b/components/gfx/platform/macos/font_context.rs index 753cb97a572d..b296ce6738b8 100644 --- a/components/gfx/platform/macos/font_context.rs +++ b/components/gfx/platform/macos/font_context.rs @@ -4,16 +4,10 @@ use malloc_size_of::{MallocSizeOf, MallocSizeOfOps}; -#[derive(Clone, Debug)] +#[derive(Clone, Debug, Default)] pub struct FontContextHandle { - _ctx: (), -} - -impl FontContextHandle { // this is a placeholder until NSFontManager or whatever is bound in here. - pub fn new() -> FontContextHandle { - FontContextHandle { _ctx: () } - } + _ctx: (), } impl MallocSizeOf for FontContextHandle { diff --git a/components/gfx/platform/windows/font_context.rs b/components/gfx/platform/windows/font_context.rs index d5e0015dd562..a67a366fc119 100644 --- a/components/gfx/platform/windows/font_context.rs +++ b/components/gfx/platform/windows/font_context.rs @@ -4,14 +4,7 @@ use malloc_size_of::malloc_size_of_is_0; -#[derive(Clone, Debug)] +#[derive(Clone, Debug, Default)] pub struct FontContextHandle; -impl FontContextHandle { - // *shrug* - pub fn new() -> FontContextHandle { - FontContextHandle {} - } -} - malloc_size_of_is_0!(FontContextHandle);