From 9f0ca9d27618fa0beb7fcddac9cc8f8b8c0147e4 Mon Sep 17 00:00:00 2001 From: Austen Adler Date: Wed, 19 May 2021 19:05:31 -0400 Subject: [PATCH] Cleanup repository --- src/calc.rs | 6 ------ src/event.rs | 1 + src/format.rs | 2 +- src/main.rs | 5 +---- 4 files changed, 3 insertions(+), 11 deletions(-) diff --git a/src/calc.rs b/src/calc.rs index de36418..966e7c3 100644 --- a/src/calc.rs +++ b/src/calc.rs @@ -25,12 +25,6 @@ enum HistoryMode { Macro, } -impl CalculatorStateChange { - pub fn is_noop(&self) -> bool { - self.push == OpArgs::None && self.pop == OpArgs::None - } -} - #[derive(Serialize, Deserialize)] #[serde(default)] pub struct Calculator { diff --git a/src/event.rs b/src/event.rs index e06efb4..27f6ce9 100644 --- a/src/event.rs +++ b/src/event.rs @@ -11,6 +11,7 @@ pub enum Event { Tick, } +#[allow(dead_code)] pub struct Events { rx: mpsc::Receiver>, tx: mpsc::Sender>, diff --git a/src/format.rs b/src/format.rs index 5658f37..a24c86a 100644 --- a/src/format.rs +++ b/src/format.rs @@ -27,7 +27,7 @@ pub fn engineering(f: f64, precision: usize) -> String { // E3 => 3 as isize let exp = exp_str[1..].parse::().unwrap(); // Sign of the exponent. If string representation starts with E-, then negative - let display_exp_sign = if let Some(stripped) = exp_str.strip_prefix("E-") { + let display_exp_sign = if exp_str.strip_prefix("E-").is_some() { '-' } else { '+' diff --git a/src/main.rs b/src/main.rs index c3e0944..b20cfa6 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,6 +1,3 @@ -#![allow(unused_variables)] -#![allow(dead_code)] - mod calc; mod event; mod format; @@ -456,7 +453,7 @@ impl ClippyRectangle<'_> { } fn draw_clippy_rect(c: ClippyRectangle, f: &mut Frame>) { - let block = Block::default().title(c.title).borders(Borders::ALL); + // let block = Block::default().title(c.title).borders(Borders::ALL); let dimensions = c.size(); let popup_layout = Layout::default() .direction(Direction::Vertical)