From 59d373cfd96d01767947c205a55f791a5a38d3a7 Mon Sep 17 00:00:00 2001 From: JohanVonElectrum Date: Fri, 1 Nov 2024 18:29:57 +0100 Subject: [PATCH] chore: resolve clippy warnings --- clap_derive/src/utils/doc_comments.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/clap_derive/src/utils/doc_comments.rs b/clap_derive/src/utils/doc_comments.rs index 5c54d38bc2b..a1c0984e3a9 100644 --- a/clap_derive/src/utils/doc_comments.rs +++ b/clap_derive/src/utils/doc_comments.rs @@ -139,8 +139,8 @@ fn is_list_item(s: &str) -> bool { } let mut chars = s.chars(); - chars.next().map_or(false, |c| c.is_digit(10)) - && chars.skip_while(|c| c.is_digit(10)).next() == Some('.') + chars.next().map(|c| c.is_ascii_digit()).unwrap_or(false) + && chars.find(|c| !c.is_ascii_digit()) == Some('.') } fn merge_lines(lines: impl IntoIterator>) -> String {