From fbd2802f089c24631bc2e971fdbf9d45fa6f4b63 Mon Sep 17 00:00:00 2001 From: Valerie Date: Mon, 4 Mar 2024 20:10:38 -0500 Subject: [PATCH] changed project name to reflect cargo package --- README.md | 24 ++++++++++++++++++++++++ src/helper.rs | 4 ++-- 2 files changed, 26 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 428d641..83387a7 100644 --- a/README.md +++ b/README.md @@ -9,6 +9,30 @@ data science, and computer science. More information is available on the [project wiki](https://git.vwolfe.io/valerie/qm/wiki). +## Installation + +### Manual Install + +
+Release Binary +Copy the compiled binary from the releases page +to a directory in $PATH, such as /usr/bin/. +
+ +
+Compile from Source +Compile using cargo with the command cargo build --release and copy +the file from target/release/ to a directory in $PATH, +such as /usr/bin/. +
+ +### Package Managers + +
+Cargo: quickmath +Install the package using Cargo with the command cargo install quickmath. +
+ ## Libraries - [evalexpr](https://crates.io/crates/evalexpr) — expression evaluator diff --git a/src/helper.rs b/src/helper.rs index 221147a..02c57de 100644 --- a/src/helper.rs +++ b/src/helper.rs @@ -15,7 +15,7 @@ pub fn fix(arg: &Value) -> EvalResult { let count = args.len(); if count != 2 { - return Err(EvalexprError::WrongFunctionArgumentAmount { expected: 2..=2, actual: count }); + return Err(EvalexprError::WrongFunctionArgumentAmount { expected: 2, actual: count }); } let float = args[0].as_float()?; @@ -63,7 +63,7 @@ pub fn logarithm(arg: &Value) -> EvalResult { output = value.log(base).into(); }, _ => { - return Err(EvalexprError::WrongFunctionArgumentAmount { expected: 2..=2, actual: count }); + return Err(EvalexprError::WrongFunctionArgumentAmount { expected: 2, actual: count }); } } return Ok(output);