Skip to content

Commit

Permalink
refactor: remove usesless clones
Browse files Browse the repository at this point in the history
  • Loading branch information
Arian8j2 committed Jan 11, 2025
1 parent 7bb2622 commit 692673d
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions crates/cli/src/commands/format.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,8 @@ pub async fn run_format(arg: &FormatArgs) -> Result<()> {
let mut results = file_path_to_resolved
.into_par_iter()
.map(|(file_path, resolved_patterns)| {
(
file_path.clone(),
format_file_resolved_patterns(file_path, resolved_patterns, arg.clone()),
)
let result = format_file_resolved_patterns(&file_path, resolved_patterns, arg.clone());
(file_path, result)
})
.collect::<Vec<_>>();

Expand Down Expand Up @@ -66,7 +64,7 @@ fn group_resolved_patterns_by_group(
}

fn format_file_resolved_patterns(
file_path: String,
file_path: &str,
patterns: Vec<ResolvedGritDefinition>,
arg: FormatArgs,
) -> Result<Option<DiffString>> {
Expand Down

0 comments on commit 692673d

Please sign in to comment.