Remove size_of_test macro from legacy layout and inline it (#34055)

in the last remaining location it is used.

Signed-off-by: Nico Burns <nico@nicoburns.com>
This commit is contained in:
Nico Burns 2024-10-29 21:46:10 +07:00 committed by GitHub
parent a501572971
commit 000144f52a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 11 additions and 25 deletions

View file

@ -16,9 +16,16 @@ use malloc_size_of::malloc_size_of_is_0;
use malloc_size_of_derive::MallocSizeOf;
use parking_lot::Mutex;
use serde::{Deserialize, Serialize};
use size_of_test::size_of_test;
use webrender_api::{ExternalScrollId, PipelineId as WebRenderPipelineId};
/// Asserts the size of a type at compile time.
macro_rules! size_of_test {
($t: ty, $expected_size: expr) => {
#[cfg(target_pointer_width = "64")]
::static_assertions::const_assert_eq!(std::mem::size_of::<$t>(), $expected_size);
};
}
macro_rules! namespace_id_method {
($func_name:ident, $func_return_data_type:ident, $self:ident, $index_name:ident) => {
fn $func_name(&mut $self) -> $func_return_data_type {