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:
parent
bd9b3af5bc
commit
ca524f19f6
13 changed files with 28 additions and 33 deletions
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue