From 625e2355b9894985b060f676f117e45087a59254 Mon Sep 17 00:00:00 2001 From: Alexander Bantyev Date: Wed, 16 Sep 2020 22:02:56 +0300 Subject: [PATCH] Fix warnings in battery --- battery/src/main.rs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/battery/src/main.rs b/battery/src/main.rs index 4f5e974..d17e18f 100644 --- a/battery/src/main.rs +++ b/battery/src/main.rs @@ -8,11 +8,9 @@ use std::io; use std::thread; use std::time::Duration; -use osd::notify::{OSD, OSDContents, OSDProgressText, Urgency}; +use osd::notify::{OSD, Urgency}; use osd::config::Config; -use battery::units::Time; - #[derive(Debug)] enum Threshold { Percentage(i32), @@ -42,8 +40,8 @@ fn parse_threshold(thresh: String) -> Option { fn main() -> battery::Result<()> { let mut config = Config::new("battery"); - let mut low_threshold_str = config.get_default("threshold", "low", String::from("30m")); - let mut critical_threshold_str = config.get_default("threshold", "critical", String::from("10m")); + let low_threshold_str = config.get_default("threshold", "low", String::from("30m")); + let critical_threshold_str = config.get_default("threshold", "critical", String::from("10m")); let low_threshold = parse_threshold(low_threshold_str).expect("Low threshold is incorrect: must be either a percentage or minutes"); let critical_threshold = parse_threshold(critical_threshold_str).expect("Critical threshold is incorrect: must be either a percentage or minutes");