From a26d25db12ad25276df16362a1a4e7ab33347952 Mon Sep 17 00:00:00 2001 From: Nicholas Nethercote Date: Wed, 18 Oct 2017 14:26:56 +1100 Subject: [PATCH] Rename `size_of_is_0!` as `malloc_size_of_is_0!`. The new name makes it clearer that it comes from the `malloc_size_of` crate. --- components/malloc_size_of/lib.rs | 20 +++++++++---------- components/style/gecko_string_cache/mod.rs | 2 +- .../style/properties/longhand/color.mako.rs | 2 +- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/components/malloc_size_of/lib.rs b/components/malloc_size_of/lib.rs index c722c176c5d..b2aadc872a9 100644 --- a/components/malloc_size_of/lib.rs +++ b/components/malloc_size_of/lib.rs @@ -415,7 +415,7 @@ impl MallocSizeOf for euclid::TypedSize2D { /// For use on types where size_of() returns 0. #[macro_export] -macro_rules! size_of_is_0( +macro_rules! malloc_size_of_is_0( ($($ty:ty),+) => ( $( impl $crate::MallocSizeOf for $ty { @@ -438,14 +438,14 @@ macro_rules! size_of_is_0( ); ); -size_of_is_0!(bool, char, str); -size_of_is_0!(u8, u16, u32, u64, usize); -size_of_is_0!(i8, i16, i32, i64, isize); -size_of_is_0!(f32, f64); +malloc_size_of_is_0!(bool, char, str); +malloc_size_of_is_0!(u8, u16, u32, u64, usize); +malloc_size_of_is_0!(i8, i16, i32, i64, isize); +malloc_size_of_is_0!(f32, f64); -size_of_is_0!(Range, Range, Range, Range, Range); -size_of_is_0!(Range, Range, Range, Range, Range); -size_of_is_0!(Range, Range); +malloc_size_of_is_0!(Range, Range, Range, Range, Range); +malloc_size_of_is_0!(Range, Range, Range, Range, Range); +malloc_size_of_is_0!(Range, Range); -size_of_is_0!(app_units::Au); -size_of_is_0!(cssparser::RGBA, cssparser::TokenSerializationType); +malloc_size_of_is_0!(app_units::Au); +malloc_size_of_is_0!(cssparser::RGBA, cssparser::TokenSerializationType); diff --git a/components/style/gecko_string_cache/mod.rs b/components/style/gecko_string_cache/mod.rs index d48b679ceaf..8346c7491f2 100644 --- a/components/style/gecko_string_cache/mod.rs +++ b/components/style/gecko_string_cache/mod.rs @@ -389,4 +389,4 @@ impl From<*mut nsAtom> for Atom { } } -size_of_is_0!(Atom); +malloc_size_of_is_0!(Atom); diff --git a/components/style/properties/longhand/color.mako.rs b/components/style/properties/longhand/color.mako.rs index b9722fc8fc9..bb39dbf27cd 100644 --- a/components/style/properties/longhand/color.mako.rs +++ b/components/style/properties/longhand/color.mako.rs @@ -72,7 +72,7 @@ pub mod system_colors { // It's hard to implement MallocSizeOf for LookAndFeel_ColorID because it // is a bindgen type. So we implement it on the typedef instead. - size_of_is_0!(SystemColor); + malloc_size_of_is_0!(SystemColor); impl ToCss for SystemColor { fn to_css(&self, dest: &mut W) -> fmt::Result where W: fmt::Write {