avoid superfluous clone+collect in extend_compound
This commit is contained in:
parent
1b8e0ebcd2
commit
b199984170
@ -383,9 +383,9 @@ impl Extender {
|
|||||||
if options.is_none() {
|
if options.is_none() {
|
||||||
let mut new_options = Vec::new();
|
let mut new_options = Vec::new();
|
||||||
if i != 0 {
|
if i != 0 {
|
||||||
new_options.push(vec![self.extension_for_compound(
|
new_options.push(vec![
|
||||||
compound.components.clone().into_iter().take(i).collect(),
|
self.extension_for_compound(compound.components[..i].to_vec())
|
||||||
)]);
|
]);
|
||||||
}
|
}
|
||||||
options.replace(new_options);
|
options.replace(new_options);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user