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); }