from_str_radix_10

This commit is contained in:
Johann Hemmann 2024-01-19 14:40:18 +01:00
parent 8982ff3bba
commit 84494d1c8e
2 changed files with 1 additions and 2 deletions

View file

@ -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"

View file

@ -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();
}