From bca98caa075f4b93041a6f058a5550966d3cce03 Mon Sep 17 00:00:00 2001 From: Kirpal Grewal <45569241+KGrewal1@users.noreply.github.com> Date: Tue, 5 Mar 2024 22:28:58 +0000 Subject: [PATCH] Enable `clippy::unnecessary_to_owned` (#8908) lint for `unnecessary_to_owned` and fix the sole violation in the codebase --- Cargo.toml | 1 - crates/editor/src/editor.rs | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index c33252f8a4744055348d2b9062502eb55d0f39be..68ce41c64466a9adc8ffec00cf99102de6b91a13 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -384,7 +384,6 @@ reversed_empty_ranges = "allow" single_range_in_vec_init = "allow" suspicious_to_owned = "allow" type_complexity = "allow" -unnecessary_to_owned = "allow" [workspace.metadata.cargo-machete] ignored = ["bindgen", "cbindgen", "prost_build", "serde"] diff --git a/crates/editor/src/editor.rs b/crates/editor/src/editor.rs index 34291fbc33874f9a3c29304fc906ccf243f3e2f1..deaae276780e6a2dbb6a24059232e0874fc932c0 100644 --- a/crates/editor/src/editor.rs +++ b/crates/editor/src/editor.rs @@ -8720,7 +8720,7 @@ impl Editor { match permalink { Ok(permalink) => { - cx.open_url(&permalink.to_string()); + cx.open_url(permalink.as_ref()); } Err(err) => { let message = format!("Failed to open permalink: {err}");