doc: comment update

This commit is contained in:
blindfs 2025-04-11 11:53:37 +08:00
parent 53c94f8a06
commit 180cb856d5

View File

@ -109,7 +109,7 @@ fn get_suggestions_by_value(
current_span: reedline::Span, current_span: reedline::Span,
) -> Vec<SemanticSuggestion> { ) -> Vec<SemanticSuggestion> {
let to_suggestion = |s: String, v: Option<&Value>| { let to_suggestion = |s: String, v: Option<&Value>| {
// Check if the string needs quoting (has spaces or punctuation) // Check if the string needs quoting
let value = if s.is_empty() let value = if s.is_empty()
|| s.chars() || s.chars()
.any(|c: char| !(c.is_ascii_alphabetic() || ['_', '-'].contains(&c))) .any(|c: char| !(c.is_ascii_alphabetic() || ['_', '-'].contains(&c)))