tree wide: clippy lint fixes

most (not all) where done automatically

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Thomas Lamprecht
2022-06-02 15:59:53 +02:00
parent c39852abdc
commit fbfb64a6b2
21 changed files with 34 additions and 46 deletions

View File

@ -147,7 +147,7 @@ fn extract_archive(
feature_flags.remove(Flags::WITH_SOCKETS);
}
let pattern = pattern.unwrap_or_else(Vec::new);
let pattern = pattern.unwrap_or_default();
let target = target.as_ref().map_or_else(|| ".", String::as_str);
let mut match_list = Vec::new();
@ -297,7 +297,7 @@ async fn create_archive(
entries_max: isize,
) -> Result<(), Error> {
let patterns = {
let input = exclude.unwrap_or_else(Vec::new);
let input = exclude.unwrap_or_default();
let mut patterns = Vec::with_capacity(input.len());
for entry in input {
patterns.push(