Skip to content

Commit

Permalink
useless constructor.simplify()
Browse files Browse the repository at this point in the history
  • Loading branch information
vic1707 committed Nov 10, 2023
1 parent ce7691c commit f6cfd1f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/element/simplify.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion src/element/unop.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
}

Expand Down

0 comments on commit f6cfd1f

Please sign in to comment.