avoid superfluous clone+collect in extend_compound

This commit is contained in:
Connor Skees 2020-07-09 11:17:43 -04:00
parent 1b8e0ebcd2
commit b199984170

View File

@ -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);
} }