Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

Enable `clippy::unnecessary_to_owned` (#8908)

Kirpal Grewalbca98caa075f
diff --git a/Cargo.toml b/Cargo.toml
index c33252f8a47..68ce41c6446 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 34291fbc338..deaae276780 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}");