From e97a887ae2ef1e29c148f8d1b9a6678643fedce4 Mon Sep 17 00:00:00 2001 From: Anthony Shew Date: Mon, 28 Oct 2024 08:59:14 -0600 Subject: [PATCH] Remove some clones. --- crates/biome_cli/src/execute/process_file.rs | 7 ++++++- crates/biome_cli/src/execute/process_file/lint.rs | 9 ++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/crates/biome_cli/src/execute/process_file.rs b/crates/biome_cli/src/execute/process_file.rs index 2beb3962fc72..f89844b0053d 100644 --- a/crates/biome_cli/src/execute/process_file.rs +++ b/crates/biome_cli/src/execute/process_file.rs @@ -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 diff --git a/crates/biome_cli/src/execute/process_file/lint.rs b/crates/biome_cli/src/execute/process_file/lint.rs index 7e23729f6c3a..30f570563839 100644 --- a/crates/biome_cli/src/execute/process_file/lint.rs +++ b/crates/biome_cli/src/execute/process_file/lint.rs @@ -15,15 +15,10 @@ pub(crate) fn lint<'ctx>( ctx: &'ctx SharedTraversalOptions<'ctx, '_>, path: &Path, suppress: bool, - suppression_reason: &Option, + suppression_reason: Option, ) -> 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>(