Use format string with panic

This commit is contained in:
Kenny Levinsen
2021-09-02 21:13:57 +02:00
parent ef84c519a2
commit e04237b928
3 changed files with 6 additions and 6 deletions
+3 -3
View File
@@ -99,7 +99,7 @@ impl BarWidgetImpl for Alsa {
fn value(&self) -> f32 {
match self.get_master_volume() {
Ok(v) => v,
Err(e) => panic!(e),
Err(e) => panic!("{}", e),
}
}
fn color(&self) -> Color {
@@ -107,12 +107,12 @@ impl BarWidgetImpl for Alsa {
}
fn inc(&mut self, diff: f32) {
if let Err(e) = self.inc_master_volume(diff) {
panic!(e)
panic!("{}", e)
}
}
fn set(&mut self, abs: f32) {
if let Err(e) = self.set_master_volume(abs) {
panic!(e)
panic!("{}", e)
}
}
fn toggle(&mut self) {}