address new clippy lints

This commit is contained in:
Rob Ede 2023-08-01 19:26:15 +01:00
parent cf9ea4560a
commit 09d9d6a3e7
No known key found for this signature in database
GPG Key ID: 97C636207D3EF933
1 changed files with 6 additions and 1 deletions

View File

@ -501,7 +501,12 @@ impl ResourceDef {
let patterns = self
.pattern_iter()
.flat_map(move |this| other.pattern_iter().map(move |other| (this, other)))
.map(|(this, other)| [this, other].join(""))
.map(|(this, other)| {
let mut pattern = String::with_capacity(this.len() + other.len());
pattern.push_str(this);
pattern.push_str(other);
pattern
})
.collect::<Vec<_>>();
match patterns.len() {