From eed8c6dab2c730c69ca693ea73d3473a2404309d Mon Sep 17 00:00:00 2001 From: Nicholas Nethercote Date: Wed, 18 Oct 2017 02:17:40 -0500 Subject: [PATCH] servo: Merge #18932 - Rename `size_of_is_0!` as `malloc_size_of_is_0!` (from nnethercote:rename-size_of_is_0); r=emilio The new name makes it clearer that it comes from the `malloc_size_of` crate. --- - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [ ] These changes fix #__ (github issue number if applicable). - [ ] There are tests for these changes OR - [X] These changes do not require tests because it's a trivial name change. Source-Repo: https://github.com/servo/servo Source-Revision: 421baa854ea40c7b1a3d1e75acac14da04a3fbcc --HG-- extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear extra : subtree_revision : cd35bb2bb9d50f1bd0acfd0280f1aa06e1c219ee --- servo/components/malloc_size_of/lib.rs | 20 +++++++++---------- .../style/gecko_string_cache/mod.rs | 2 +- .../style/properties/longhand/color.mako.rs | 2 +- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/servo/components/malloc_size_of/lib.rs b/servo/components/malloc_size_of/lib.rs index c722c176c5db..b2aadc872a93 100644 --- a/servo/components/malloc_size_of/lib.rs +++ b/servo/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/servo/components/style/gecko_string_cache/mod.rs b/servo/components/style/gecko_string_cache/mod.rs index d48b679ceaf6..8346c7491f27 100644 --- a/servo/components/style/gecko_string_cache/mod.rs +++ b/servo/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/servo/components/style/properties/longhand/color.mako.rs b/servo/components/style/properties/longhand/color.mako.rs index b9722fc8fc90..bb39dbf27cdc 100644 --- a/servo/components/style/properties/longhand/color.mako.rs +++ b/servo/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 {