mirror of
https://github.com/servo/servo.git
synced 2025-08-04 21:20:23 +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
|
@ -418,6 +418,10 @@ where
|
|||
/// without causing conflicts , unexpected behavior.
|
||||
/// <https://github.com/servo/mozjs/blob/main/mozjs-sys/mozjs/js/public/ArrayBuffer.h#L89>
|
||||
unsafe extern "C" fn free_func(_contents: *mut c_void, free_user_data: *mut c_void) {
|
||||
// Clippy warns about "creating a `Arc` from a void raw pointer" here, but suggests
|
||||
// the exact same line to fix it. Doing the cast is tricky because of the use of
|
||||
// a generic type in this parameter.
|
||||
#[allow(clippy::from_raw_with_void_ptr)]
|
||||
let _ = Arc::from_raw(free_user_data as *const _);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue