1
0
Fork 0
mirror of https://github.com/Zedfrigg/ironbar.git synced 2025-08-17 23:01:04 +02:00

refactor: fix some strict clippy warnings

This commit is contained in:
Jake Stanger 2025-05-25 12:14:24 +01:00
parent bd9b3af5bc
commit ca524f19f6
No known key found for this signature in database
GPG key ID: C51FC8F9CB0BEA61
13 changed files with 28 additions and 33 deletions

View file

@ -25,13 +25,11 @@ pub struct LayoutConfig {
impl LayoutConfig {
pub fn orientation(&self, info: &ModuleInfo) -> gtk::Orientation {
self.orientation
.map(ModuleOrientation::into)
.unwrap_or(info.bar_position.orientation())
.map_or(info.bar_position.orientation(), ModuleOrientation::into)
}
pub fn angle(&self, info: &ModuleInfo) -> f64 {
self.orientation
.map(ModuleOrientation::to_angle)
.unwrap_or(info.bar_position.angle())
.map_or(info.bar_position.angle(), ModuleOrientation::to_angle)
}
}