Remove non-needed clones
I am not certain if this will improve performance, but it seems having a .clone() without any need should be removed. This was done with clippy, and manually reviewed: ``` cargo clippy --fix -- -A clippy::all -D clippy::redundant_clone ```
This commit is contained in:
@@ -57,7 +57,7 @@ impl<'a> LexedStr<'a> {
|
||||
let mut conv = Converter::new(text);
|
||||
conv.extend_token(&token.kind, text);
|
||||
match &*conv.res.kind {
|
||||
[kind] => Some((*kind, conv.res.error.pop().map(|it| it.msg.clone()))),
|
||||
[kind] => Some((*kind, conv.res.error.pop().map(|it| it.msg))),
|
||||
_ => None,
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user