aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAkshay <[email protected]>2020-11-02 14:30:42 +0000
committerAkshay <[email protected]>2020-11-02 14:30:42 +0000
commit72789dff9c52cf2c5ef7772b301a1d5cfd90e272 (patch)
tree9adaee9dc9e999d1d571501435ce98b1b34eabd1 /src
parentd31097959f29d7b82dabfd050eb988a896c2e44b (diff)
fixes for nix
Diffstat (limited to 'src')
-rw-r--r--src/error.rs (renamed from src/error/mod.rs)0
-rw-r--r--src/format.rs (renamed from src/format/mod.rs)0
-rw-r--r--src/lex.rs (renamed from src/lex/mod.rs)3
-rw-r--r--src/main.rs3
-rw-r--r--src/parse.rs (renamed from src/parse/mod.rs)0
-rw-r--r--src/readline.rs (renamed from src/readline/mod.rs)0
6 files changed, 2 insertions, 4 deletions
diff --git a/src/error/mod.rs b/src/error.rs
index ec2b555..ec2b555 100644
--- a/src/error/mod.rs
+++ b/src/error.rs
diff --git a/src/format/mod.rs b/src/format.rs
index 45673d7..45673d7 100644
--- a/src/format/mod.rs
+++ b/src/format.rs
diff --git a/src/lex/mod.rs b/src/lex.rs
index 3222c12..a2de98a 100644
--- a/src/lex/mod.rs
+++ b/src/lex.rs
@@ -5,9 +5,8 @@
5use lazy_static::lazy_static; 5use lazy_static::lazy_static;
6use std::collections::HashMap; 6use std::collections::HashMap;
7 7
8use crate::CONFIGURATION;
9
10use crate::error::{CalcError, Math}; 8use crate::error::{CalcError, Math};
9use crate::CONFIGURATION;
11 10
12#[derive(Debug, Copy, Clone, PartialEq)] 11#[derive(Debug, Copy, Clone, PartialEq)]
13pub struct Operator { 12pub struct Operator {
diff --git a/src/main.rs b/src/main.rs
index bc22ce2..5540da9 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -192,8 +192,7 @@ fn parse_arguments() -> Configuration {
192} 192}
193 193
194pub fn eval_math_expression(input: &str, prev_ans: Option<f64>) -> Result<f64, CalcError> { 194pub fn eval_math_expression(input: &str, prev_ans: Option<f64>) -> Result<f64, CalcError> {
195 let input = input.trim(); 195 let input = input.trim().replace(" ", "");
196 let input = input.replace(" ", "");
197 if input.is_empty() { 196 if input.is_empty() {
198 return Ok(0.); 197 return Ok(0.);
199 } 198 }
diff --git a/src/parse/mod.rs b/src/parse.rs
index aa8bd4b..aa8bd4b 100644
--- a/src/parse/mod.rs
+++ b/src/parse.rs
diff --git a/src/readline/mod.rs b/src/readline.rs
index ea195ee..ea195ee 100644
--- a/src/readline/mod.rs
+++ b/src/readline.rs