mirror of
https://github.com/emilk/egui.git
synced 2026-08-31 05:40:03 -04:00
Enable a few more clippy lints (#8064)
Enable these new clippy lints and fix all warnings: * `format_push_string` — use `write!` instead of `s += &format!(…)` to avoid extra allocations * `ignored_unit_patterns` — use `()` instead of `_` when matching unit * `missing_fields_in_debug` — ensure manual `Debug` impls account for all fields * `needless_raw_string_hashes` — remove unnecessary `r#` on string literals * `ref_option` — prefer `Option<&T>` over `&Option<T>` in function signatures
This commit is contained in:
@@ -296,15 +296,22 @@ impl Clone for WgpuSetupCreateNew {
|
||||
|
||||
impl std::fmt::Debug for WgpuSetupCreateNew {
|
||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||
let Self {
|
||||
instance_descriptor,
|
||||
display_handle,
|
||||
power_preference,
|
||||
native_adapter_selector,
|
||||
device_descriptor: _,
|
||||
} = self;
|
||||
f.debug_struct("WgpuSetupCreateNew")
|
||||
.field("instance_descriptor", &self.instance_descriptor)
|
||||
.field("display_handle", &self.display_handle)
|
||||
.field("power_preference", &self.power_preference)
|
||||
.field("instance_descriptor", instance_descriptor)
|
||||
.field("display_handle", display_handle)
|
||||
.field("power_preference", power_preference)
|
||||
.field(
|
||||
"native_adapter_selector",
|
||||
&self.native_adapter_selector.is_some(),
|
||||
&native_adapter_selector.is_some(),
|
||||
)
|
||||
.finish()
|
||||
.finish_non_exhaustive()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user