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:
Martin Robinson 2024-07-04 13:40:23 +02:00 committed by GitHub
parent 93fdb8263d
commit 26624a109f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
27 changed files with 150 additions and 113 deletions

View file

@ -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 {