Cleanup repository

This commit is contained in:
Austen Adler 2021-05-19 19:05:31 -04:00
parent 37ba5f6fde
commit 9f0ca9d276
4 changed files with 3 additions and 11 deletions

View File

@ -25,12 +25,6 @@ enum HistoryMode {
Macro, Macro,
} }
impl CalculatorStateChange {
pub fn is_noop(&self) -> bool {
self.push == OpArgs::None && self.pop == OpArgs::None
}
}
#[derive(Serialize, Deserialize)] #[derive(Serialize, Deserialize)]
#[serde(default)] #[serde(default)]
pub struct Calculator { pub struct Calculator {

View File

@ -11,6 +11,7 @@ pub enum Event<I> {
Tick, Tick,
} }
#[allow(dead_code)]
pub struct Events { pub struct Events {
rx: mpsc::Receiver<Event<KeyEvent>>, rx: mpsc::Receiver<Event<KeyEvent>>,
tx: mpsc::Sender<Event<KeyEvent>>, tx: mpsc::Sender<Event<KeyEvent>>,

View File

@ -27,7 +27,7 @@ pub fn engineering(f: f64, precision: usize) -> String {
// E3 => 3 as isize // E3 => 3 as isize
let exp = exp_str[1..].parse::<isize>().unwrap(); let exp = exp_str[1..].parse::<isize>().unwrap();
// Sign of the exponent. If string representation starts with E-, then negative // 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 { } else {
'+' '+'

View File

@ -1,6 +1,3 @@
#![allow(unused_variables)]
#![allow(dead_code)]
mod calc; mod calc;
mod event; mod event;
mod format; mod format;
@ -456,7 +453,7 @@ impl ClippyRectangle<'_> {
} }
fn draw_clippy_rect<T: std::io::Write>(c: ClippyRectangle, f: &mut Frame<CrosstermBackend<T>>) { fn draw_clippy_rect<T: std::io::Write>(c: ClippyRectangle, f: &mut Frame<CrosstermBackend<T>>) {
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 dimensions = c.size();
let popup_layout = Layout::default() let popup_layout = Layout::default()
.direction(Direction::Vertical) .direction(Direction::Vertical)