chore: Fix remaining clippy lints
This commit is contained in:
parent
0a016991a4
commit
5216eb50ba
14 changed files with 64 additions and 50 deletions
36
src/debug.rs
36
src/debug.rs
|
|
@ -27,7 +27,7 @@ pub const RENDER_COLOR: Color32 = Color32::from_rgb(29, 114, 58);
|
|||
pub const SUBMITTED_COLOR: Color32 = Color32::from_rgb(253, 178, 39);
|
||||
pub const DISPLAY_COLOR: Color32 = Color32::from_rgb(41, 184, 209);
|
||||
|
||||
pub fn fps_ui<'a>(
|
||||
pub fn fps_ui(
|
||||
gpu: Option<&DrmNode>,
|
||||
debug_active: bool,
|
||||
seats: &[Seat<State>],
|
||||
|
|
@ -122,23 +122,19 @@ pub fn fps_ui<'a>(
|
|||
if let Ok(vendor) = std::fs::read_to_string(format!(
|
||||
"/sys/class/drm/renderD{}/device/vendor",
|
||||
gpu.minor()
|
||||
)) {
|
||||
if let Some(img) = match vendor.trim() {
|
||||
"0x10de" => Some(egui::include_image!(
|
||||
"../resources/icons/nvidia.svg"
|
||||
)),
|
||||
"0x1002" => {
|
||||
Some(egui::include_image!("../resources/icons/amd.svg"))
|
||||
}
|
||||
"0x8086" => Some(egui::include_image!(
|
||||
"../resources/icons/intel.svg"
|
||||
)),
|
||||
_ => None,
|
||||
} {
|
||||
ui.add(
|
||||
egui::Image::new(img).max_height(resp.rect.height()),
|
||||
);
|
||||
)) && let Some(img) = match vendor.trim() {
|
||||
"0x10de" => {
|
||||
Some(egui::include_image!("../resources/icons/nvidia.svg"))
|
||||
}
|
||||
"0x1002" => {
|
||||
Some(egui::include_image!("../resources/icons/amd.svg"))
|
||||
}
|
||||
"0x8086" => {
|
||||
Some(egui::include_image!("../resources/icons/intel.svg"))
|
||||
}
|
||||
_ => None,
|
||||
} {
|
||||
ui.add(egui::Image::new(img).max_height(resp.rect.height()));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
@ -311,7 +307,7 @@ fn format_pointer_focus(focus: Option<PointerFocusTarget>) -> String {
|
|||
),
|
||||
Some(ResizeFork(_)) => String::from("Resize UI"),
|
||||
Some(ZoomUI(_)) => String::from("Zoom UI"),
|
||||
None => format!("None"),
|
||||
None => "None".to_string(),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -348,8 +344,8 @@ fn format_keyboard_focus(focus: Option<KeyboardFocusTarget>) -> String {
|
|||
),
|
||||
Some(LayerSurface(x)) => format!("LayerSurface {}", x.wl_surface().id().protocol_id()),
|
||||
Some(Popup(x)) => format!("Popup {}", x.wl_surface().id().protocol_id()),
|
||||
Some(Group(_)) => format!("Window Group"),
|
||||
Some(Group(_)) => "Window Group".to_string(),
|
||||
Some(LockSurface(x)) => format!("LockSurface {}", x.wl_surface().id().protocol_id()),
|
||||
None => format!("None"),
|
||||
None => "None".to_string(),
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue