From 7fdf806874cbf30f235e98cd9cb28a34d0215eb0 Mon Sep 17 00:00:00 2001 From: Martin Robinson Date: Mon, 27 Mar 2023 14:58:44 +0200 Subject: [PATCH] Fix some build warnings --- components/hashglobe/src/alloc.rs | 2 +- components/hashglobe/src/table.rs | 1 - components/layout_thread/lib.rs | 1 - components/layout_thread_2020/lib.rs | 1 - 4 files changed, 1 insertion(+), 4 deletions(-) diff --git a/components/hashglobe/src/alloc.rs b/components/hashglobe/src/alloc.rs index 89f45a25015..50e86ee4af6 100644 --- a/components/hashglobe/src/alloc.rs +++ b/components/hashglobe/src/alloc.rs @@ -27,7 +27,7 @@ pub use self::platform::{alloc, dealloc, realloc}; #[cfg(any(unix, target_os = "redox"))] mod platform { - extern crate libc; + use libc; #[cfg(not(any(target_os = "android")))] use std::ptr; diff --git a/components/hashglobe/src/table.rs b/components/hashglobe/src/table.rs index de02e09de97..98f6da2a700 100644 --- a/components/hashglobe/src/table.rs +++ b/components/hashglobe/src/table.rs @@ -724,7 +724,6 @@ fn test_offset_calculation() { impl RawTable { unsafe fn new_uninitialized(capacity: usize) -> RawTable { - extern crate libc; if let Ok(table) = Self::try_new_uninitialized(capacity) { table } else { diff --git a/components/layout_thread/lib.rs b/components/layout_thread/lib.rs index 77f95323490..7600cdd478d 100644 --- a/components/layout_thread/lib.rs +++ b/components/layout_thread/lib.rs @@ -63,7 +63,6 @@ use layout::traversal::{ }; use layout::wrapper::LayoutNodeLayoutData; use layout_traits::LayoutThreadFactory; -use libc::c_void; use malloc_size_of::{MallocSizeOf, MallocSizeOfOps}; use metrics::{PaintTimeMetrics, ProfilerMetadataFactory, ProgressiveWebMetric}; use msg::constellation_msg::{ diff --git a/components/layout_thread_2020/lib.rs b/components/layout_thread_2020/lib.rs index fd94c32dc0c..fd5f0c91b32 100644 --- a/components/layout_thread_2020/lib.rs +++ b/components/layout_thread_2020/lib.rs @@ -48,7 +48,6 @@ use layout::query::{ use layout::traversal::RecalcStyle; use layout::{BoxTree, FragmentTree}; use layout_traits::LayoutThreadFactory; -use libc::c_void; use malloc_size_of::{MallocSizeOf, MallocSizeOfOps}; use metrics::{PaintTimeMetrics, ProfilerMetadataFactory, ProgressiveWebMetric}; use msg::constellation_msg::{