Unnamed repository; edit this file 'description' to name the repository.
from_str_radix_10
Johann Hemmann 2024-01-19
parent 8982ff3 · commit 84494d1
-rw-r--r--Cargo.toml1
-rw-r--r--crates/rust-analyzer/src/handlers/notification.rs2
2 files changed, 1 insertions, 2 deletions
diff --git a/Cargo.toml b/Cargo.toml
index a3c2dc4eb7..5804941080 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -176,7 +176,6 @@ field_reassign_with_default = "allow"
forget_non_drop = "allow"
format_collect = "allow"
filter_map_bool_then = "allow"
-from_str_radix_10 = "allow"
if_same_then_else = "allow"
large_enum_variant = "allow"
match_like_matches_macro = "allow"
diff --git a/crates/rust-analyzer/src/handlers/notification.rs b/crates/rust-analyzer/src/handlers/notification.rs
index ce69d61225..c556fdee50 100644
--- a/crates/rust-analyzer/src/handlers/notification.rs
+++ b/crates/rust-analyzer/src/handlers/notification.rs
@@ -36,7 +36,7 @@ pub(crate) fn handle_work_done_progress_cancel(
) -> anyhow::Result<()> {
if let lsp_types::NumberOrString::String(s) = &params.token {
if let Some(id) = s.strip_prefix("rust-analyzer/flycheck/") {
- if let Ok(id) = u32::from_str_radix(id, 10) {
+ if let Ok(id) = id.parse::<u32>() {
if let Some(flycheck) = state.flycheck.get(id as usize) {
flycheck.cancel();
}