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:
Wolfgang Bumiller 2021-01-26 10:24:14 +01:00
parent 4d104cd4d8
commit 340c0bf9e3

View File

@ -185,7 +185,7 @@ where
let writer = &mut writer as &mut dyn pxar::encoder::SeqWrite;
let mut encoder = Encoder::new(writer, &metadata)?;
let mut patterns = options.patterns.clone();
let mut patterns = options.patterns;
if options.skip_lost_and_found {
patterns.push(MatchEntry::parse_pattern(