From bded83177e34b6041c9dcae28114c386416aae69 Mon Sep 17 00:00:00 2001 From: Alexandre Pasmantier Date: Mon, 6 Jan 2025 18:12:25 +0100 Subject: [PATCH] fix: remove a couple of allowed lint rules and fix string creation antipattern --- Cargo.toml | 3 --- crates/television-utils/src/input.rs | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index d932614..3918ddb 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -141,10 +141,7 @@ return_self_not_must_use = "allow" uninlined_format_args = "allow" similar_names = "allow" float_cmp = "allow" -needless_pass_by_value = "allow" implicit_hasher = "allow" wildcard_imports = "allow" from_iter_instead_of_collect = "allow" -cast_possible_truncation = "allow" -cast_sign_loss = "allow" diff --git a/crates/television-utils/src/input.rs b/crates/television-utils/src/input.rs index 390682d..6261ca7 100644 --- a/crates/television-utils/src/input.rs +++ b/crates/television-utils/src/input.rs @@ -218,7 +218,7 @@ impl Input { None } else { let cursor = self.cursor; - self.value = "".into(); + self.value = String::new(); self.cursor = 0; Some(StateChanged { value: true,