Skip to content

Commit

Permalink
perf/remove unnecessary clone (#218)
Browse files Browse the repository at this point in the history
  • Loading branch information
sighphyre authored Jun 27, 2023
1 parent 92c882e commit 5808004
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,6 @@ debug/

# Backup files generated by rust fmt
**/*.rs.bk

# Heaptrack dump files
heaptrack.*
5 changes: 2 additions & 3 deletions server/src/client_api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -91,13 +91,12 @@ async fn resolve_features(
query: Some(query),
features: f
.features
.clone()
.into_iter()
.filter(|f| {
filters
.name_prefix
.clone()
.map(|prefix| f.name.starts_with(&prefix))
.as_ref()
.map(|prefix| f.name.starts_with(prefix))
.unwrap_or(true)
})
.collect(),
Expand Down

0 comments on commit 5808004

Please sign in to comment.