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::cmp_owned` (#8899)

Marshall Bowers9e66d48ccd3b
diff --git a/Cargo.toml b/Cargo.toml
index 55f89801153..c1102dec925 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -373,7 +373,6 @@ arc_with_non_send_sync = "allow"
await_holding_lock = "allow"
borrowed_box = "allow"
cast_abs_to_unsigned = "allow"
-cmp_owned = "allow"
derive_ord_xor_partial_ord = "allow"
eq_op = "allow"
implied_bounds_in_impls = "allow"
diff --git a/crates/assistant/src/assistant_panel.rs b/crates/assistant/src/assistant_panel.rs
index 97f0bca0830..28623ea8b14 100644
--- a/crates/assistant/src/assistant_panel.rs
+++ b/crates/assistant/src/assistant_panel.rs
@@ -652,7 +652,7 @@ impl AssistantPanel {
// If Markdown or No Language is Known, increase the randomness for more creative output
// If Code, decrease temperature to get more deterministic outputs
let temperature = if let Some(language) = language_name.clone() {
- if language.to_string() != "Markdown".to_string() {
+ if *language != *"Markdown" {
0.5
} else {
1.0