some low hanging clippy::perf fixes

This commit is contained in:
Matthias Krüger 2021-08-31 00:54:48 +02:00
parent 76d18cfb89
commit 7f2df9ad65
6 changed files with 11 additions and 10 deletions

View file

@ -664,7 +664,7 @@ impl ToJson for SanitizerSet {
self.into_iter()
.map(|v| Some(v.as_str()?.to_json()))
.collect::<Option<Vec<_>>>()
.unwrap_or(Vec::new())
.unwrap_or_default()
.to_json()
}
}