mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
clippy: Fix a bunch of warnings in script
(#32680)
This is just a portion of the errors that are remaining to be fixed.
This commit is contained in:
parent
93fdb8263d
commit
26624a109f
27 changed files with 150 additions and 113 deletions
|
@ -238,7 +238,7 @@ pub struct RootCollection {
|
|||
roots: UnsafeCell<Vec<*const dyn JSTraceable>>,
|
||||
}
|
||||
|
||||
thread_local!(static STACK_ROOTS: Cell<Option<*const RootCollection>> = Cell::new(None));
|
||||
thread_local!(static STACK_ROOTS: Cell<Option<*const RootCollection>> = const { Cell::new(None) });
|
||||
|
||||
pub struct ThreadLocalStackRoots<'a>(PhantomData<&'a u32>);
|
||||
|
||||
|
@ -339,6 +339,10 @@ impl<T> MallocSizeOf for Dom<T> {
|
|||
|
||||
impl<T> Dom<T> {
|
||||
/// Returns `LayoutDom<T>` containing the same pointer.
|
||||
///
|
||||
/// # Safety
|
||||
///
|
||||
/// The `self` parameter to this method must meet all the requirements of [`ptr::NonNull::as_ref`].
|
||||
pub unsafe fn to_layout(&self) -> LayoutDom<T> {
|
||||
assert_in_layout();
|
||||
LayoutDom {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue