Skip to content

Commit 1998795

Browse files
committed
chore: lint
1 parent fcf3a10 commit 1998795

2 files changed

Lines changed: 7 additions & 4 deletions

File tree

  • crates/wayle-shell/src/shell/bar

crates/wayle-shell/src/shell/bar/dropdowns/notification/notification_item/methods.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,7 @@ impl NotificationItem {
2222
}
2323

2424
ResolvedIcon::File(path) => {
25-
if let Some(texture) = load_scaled_file_icon(path, DROPDOWN_ICON_TEXTURE_SIZE_PX)
26-
{
25+
if let Some(texture) = load_scaled_file_icon(path, DROPDOWN_ICON_TEXTURE_SIZE_PX) {
2726
icon.set_paintable(Some(&texture));
2827
icon_container.add_css_class("file-icon");
2928
} else {

crates/wayle-shell/src/shell/bar/modules/systray/item/helpers.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,9 @@ pub(super) fn hash_pixmaps(pixmaps: &[IconPixmap]) -> u64 {
4141
}
4242

4343
pub(super) fn load_scaled_texture_from_file(path: &str) -> Option<gdk::Texture> {
44-
let pixbuf = gdk_pixbuf::Pixbuf::from_file_at_scale(path, TARGET_ICON_SIZE, TARGET_ICON_SIZE, true).ok()?;
44+
let pixbuf =
45+
gdk_pixbuf::Pixbuf::from_file_at_scale(path, TARGET_ICON_SIZE, TARGET_ICON_SIZE, true)
46+
.ok()?;
4547
Some(gdk::Texture::for_pixbuf(&pixbuf))
4648
}
4749

@@ -61,7 +63,9 @@ pub(super) fn find_icon_in_theme_path(theme_path: &str, icon_name: &str) -> Opti
6163
}
6264

6365
pub(super) fn load_icon_from_theme_path(theme_path: &str, icon_name: &str) -> Option<gdk::Texture> {
64-
find_icon_in_theme_path(theme_path, icon_name).as_deref().and_then(load_scaled_texture_from_file)
66+
find_icon_in_theme_path(theme_path, icon_name)
67+
.as_deref()
68+
.and_then(load_scaled_texture_from_file)
6569
}
6670

6771
fn argb_to_rgba(argb: &[u8]) -> Vec<u8> {

0 commit comments

Comments
 (0)