Skip to content

Commit

Permalink
Remove some clones.
Browse files Browse the repository at this point in the history
  • Loading branch information
anthonyshew committed Oct 28, 2024
1 parent f59db4f commit e97a887
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
7 changes: 6 additions & 1 deletion crates/biome_cli/src/execute/process_file.rs
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,12 @@ pub(crate) fn process_file(ctx: &TraversalOptions, biome_path: &BiomePath) -> Fi
..
} => {
// the unsupported case should be handled already at this point
lint(shared_context, biome_path, suppress, suppression_reason)
lint(
shared_context,
biome_path,
suppress,
suppression_reason.to_owned(),
)
}
TraversalMode::Format { .. } => {
// the unsupported case should be handled already at this point
Expand Down
9 changes: 2 additions & 7 deletions crates/biome_cli/src/execute/process_file/lint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,10 @@ pub(crate) fn lint<'ctx>(
ctx: &'ctx SharedTraversalOptions<'ctx, '_>,
path: &Path,
suppress: bool,
suppression_reason: &Option<String>,
suppression_reason: Option<String>,
) -> FileResult {
let mut workspace_file = WorkspaceFile::new(ctx, path)?;
lint_with_guard(
ctx,
&mut workspace_file,
suppress,
suppression_reason.clone(),
)
lint_with_guard(ctx, &mut workspace_file, suppress, suppression_reason)
}

pub(crate) fn lint_with_guard<'ctx>(
Expand Down

0 comments on commit e97a887

Please sign in to comment.