Skip to content

Commit bfa6877

Browse files
AdianKozlicaedfloreshz
authored andcommitted
fix: use terse flag for qalc
1 parent a0e9b15 commit bfa6877

2 files changed

Lines changed: 2 additions & 12 deletions

File tree

src/app.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -430,6 +430,7 @@ impl Application for CosmicCalculator {
430430
}
431431
Message::Evaluate => {
432432
let mut command = Command::new("qalc");
433+
command.args(["-t"]);
433434
command.args(["-u8"]);
434435
command.args(["-set", "maxdeci 9"]);
435436

@@ -469,9 +470,8 @@ impl Application for CosmicCalculator {
469470
return Task::batch(tasks);
470471
};
471472

472-
let outcome = operations::extract_value(&outcome);
473-
474473
self.calculator.outcome = outcome.to_string();
474+
475475
let mut history = self.config.history.clone();
476476
history.push(self.calculator.clone());
477477
if let Some(config_handler) = &self.config_handler

src/app/operations.rs

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -106,16 +106,6 @@ pub async fn uses_decimal_comma() -> bool {
106106
false
107107
}
108108

109-
/// Extracts the value from an outcome expression.
110-
pub fn extract_value(expression: &str) -> &str {
111-
expression
112-
.rfind('=')
113-
.map(|p| p + 1)
114-
.or_else(|| expression.rfind('≈').map(|p| p + 3))
115-
.map(|pos| expression[pos..].trim())
116-
.unwrap_or(expression)
117-
}
118-
119109
pub fn autocalc() -> bool {
120110
let min_version = Version::parse("5.4.0").unwrap();
121111
qalc_version()

0 commit comments

Comments
 (0)