mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
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:
parent
a501572971
commit
000144f52a
7 changed files with 11 additions and 25 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue