use saturating_add and vec with_capacity in even more places

Signed-off-by: strawberry <strawberry@puppygock.gay>
This commit is contained in:
strawberry 2024-06-01 00:49:56 -04:00
parent 4ea7af5780
commit 83220b43a2
6 changed files with 20 additions and 20 deletions

View file

@ -64,8 +64,8 @@ impl TryFrom<Vec<Namespace>> for NamespaceRegex {
type Error = regex::Error;
fn try_from(value: Vec<Namespace>) -> Result<Self, regex::Error> {
let mut exclusive = vec![];
let mut non_exclusive = vec![];
let mut exclusive = Vec::with_capacity(value.len());
let mut non_exclusive = Vec::with_capacity(value.len());
for namespace in value {
if namespace.exclusive {