mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
clippy: fix some warnings in components/canvas (#31563)
This commit is contained in:
parent
ef3dad3a61
commit
5c4f8cf0df
7 changed files with 90 additions and 98 deletions
|
@ -38,11 +38,11 @@ fn main() {
|
|||
.and_then(|pkg| pkg.get("source").and_then(|source| source.as_str()))
|
||||
.unwrap_or("unknown");
|
||||
|
||||
let parsed: Vec<&str> = source.split("#").collect();
|
||||
let parsed: Vec<&str> = source.split('#').collect();
|
||||
let revision = if parsed.len() > 1 { parsed[1] } else { source };
|
||||
|
||||
let mut revision_module_file = File::create(&revision_file_path).unwrap();
|
||||
write!(&mut revision_module_file, "{}", format!("\"{}\"", revision)).unwrap();
|
||||
let mut revision_module_file = File::create(revision_file_path).unwrap();
|
||||
write!(&mut revision_module_file, "\"{}\"", revision).unwrap();
|
||||
},
|
||||
_ => panic!("Cannot find package definitions in lockfile"),
|
||||
}
|
||||
|
|
|
@ -530,6 +530,7 @@ impl<Window: WindowMethods + ?Sized> IOCompositor<Window> {
|
|||
/// and the system creates a new native surface that needs to bound to the current
|
||||
/// context.
|
||||
#[allow(unsafe_code)]
|
||||
#[allow(clippy::not_unsafe_ptr_arg_deref)] // It has an unsafe block inside
|
||||
pub fn replace_native_surface(&mut self, native_widget: *mut c_void, coords: DeviceIntSize) {
|
||||
debug!("Replacing native surface in compositor: {native_widget:?}");
|
||||
let connection = self.rendering_context.connection();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue