pxar: don't clone patterns unnecessarily
The options struct has no Drop handler and is passed by-move so we can partially move out of it. Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
parent
4d104cd4d8
commit
340c0bf9e3
|
@ -185,7 +185,7 @@ where
|
||||||
let writer = &mut writer as &mut dyn pxar::encoder::SeqWrite;
|
let writer = &mut writer as &mut dyn pxar::encoder::SeqWrite;
|
||||||
let mut encoder = Encoder::new(writer, &metadata)?;
|
let mut encoder = Encoder::new(writer, &metadata)?;
|
||||||
|
|
||||||
let mut patterns = options.patterns.clone();
|
let mut patterns = options.patterns;
|
||||||
|
|
||||||
if options.skip_lost_and_found {
|
if options.skip_lost_and_found {
|
||||||
patterns.push(MatchEntry::parse_pattern(
|
patterns.push(MatchEntry::parse_pattern(
|
||||||
|
|
Loading…
Reference in New Issue