From f6cfd1f3ce570378864d679efbfea38ececa150a Mon Sep 17 00:00:00 2001 From: vic1707 <28602203+vic1707@users.noreply.github.com> Date: Fri, 10 Nov 2023 22:31:09 +0100 Subject: [PATCH] useless `constructor.simplify()` --- src/element/simplify.rs | 2 +- src/element/unop.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/element/simplify.rs b/src/element/simplify.rs index 4ba75b6..f564850 100644 --- a/src/element/simplify.rs +++ b/src/element/simplify.rs @@ -71,7 +71,7 @@ impl<'a> Simplify<'a> for BinOp<'a> { lhs, rhs, } if lhs == Number(0.0_f64) => { - UnOp::new(Operator::Minus, rhs).simplify() + UnOp::new_element(Operator::Minus, rhs) }, // .. - 0 => .. BinOp { diff --git a/src/element/unop.rs b/src/element/unop.rs index 2253147..f9db5bb 100644 --- a/src/element/unop.rs +++ b/src/element/unop.rs @@ -10,7 +10,7 @@ pub struct UnOp<'a> { } impl<'a> UnOp<'a> { - pub const fn new(op: Operator, operand: Element<'a>) -> Self { + const fn new(op: Operator, operand: Element<'a>) -> Self { Self { op, operand } }