From c0de467076889e6eb35408d7b9e5c4f6012d6891 Mon Sep 17 00:00:00 2001 From: gbrochar Date: Mon, 7 Aug 2023 17:29:28 +0200 Subject: [PATCH] feat(maths::solver): prep solver --- src/lib.rs | 2 +- src/main.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 65bf09e..76daeab 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -8,7 +8,7 @@ pub mod parser; pub mod maths; -pub fn pretty(v: Vec) { +pub fn pretty(v: &Vec) { v[0].print(); for i in 1..v.len() { print!(" + "); diff --git a/src/main.rs b/src/main.rs index 4818ec9..08fbf2f 100644 --- a/src/main.rs +++ b/src/main.rs @@ -10,7 +10,7 @@ fn main() { println!("{:?}", equation); let is_equation = computorv1::maths::evaluator::is_equation(&equation); let evaluated = computorv1::maths::evaluator::evaluate(equation); - computorv1::pretty(evaluated); + computorv1::pretty(&evaluated); if is_equation { computorv1::maths::solver::solve(evaluated); }