From 84494d1c8e84b98d88b8c8d7e8e7f57da8fb614e Mon Sep 17 00:00:00 2001 From: Johann Hemmann Date: Fri, 19 Jan 2024 14:40:18 +0100 Subject: [PATCH] from_str_radix_10 --- Cargo.toml | 1 - crates/rust-analyzer/src/handlers/notification.rs | 2 +- 2 files changed, 1 insertion(+), 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) = ¶ms.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::() { if let Some(flycheck) = state.flycheck.get(id as usize) { flycheck.cancel(); }