mirror of
https://github.com/rm-dr/daisy
synced 2025-08-02 01:34:50 -07:00
Minor cleanup
This commit is contained in:
@ -127,7 +127,7 @@ impl Expression {
|
||||
| Expression::Constant(l, _)
|
||||
| Expression::Variable(l, _)
|
||||
| Expression::Operator(l, _,_)
|
||||
=> { l.clone() }
|
||||
=> { *l }
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -84,7 +84,7 @@ pub fn find_subs(
|
||||
} else {
|
||||
let target = target.unwrap();
|
||||
let l = t.get_mut_line_location();
|
||||
r.push_back((l.clone(), String::from(target)));
|
||||
r.push_back((*l, String::from(target)));
|
||||
|
||||
let old_len = l.len;
|
||||
let new_len = target.chars().count();
|
||||
|
@ -195,7 +195,7 @@ pub fn groupify(
|
||||
(LineLocation, ParserError)
|
||||
> {
|
||||
|
||||
let last_linelocation = g.back().unwrap().get_line_location().clone();
|
||||
let last_linelocation: LineLocation = *g.back().unwrap().get_line_location();
|
||||
|
||||
// Vector of grouping levels
|
||||
let mut levels: Vec<(LineLocation, VecDeque<Token>)> = Vec::with_capacity(8);
|
||||
|
Reference in New Issue
Block a user