fn suggested_kind_from(kind_list: &[TokenKind], token_str: &str) -> Option<TokenKind> {
        kind_list.iter().find_map(|x| {
            if Self::is_misspelled_kind(*x, token_str) {
                Some(*x)
            } else {
                None
            }
        })
    }
// If token_str is a misspelling (by our narrow definition of misspelling)
// of a TokenKind from kind_list, return the TokenKind that token_str is a
// misspelling of. Otherwise, return None.
If token_str is a misspelling (by our narrow definition of misspelling)
of a TokenKind from kind_list, return the TokenKind that token_str is a
misspelling of. Otherwise, return None.
If token_str is a misspelling ( by our narrow definition of misspelling ) of a TokenKind from kind_list return the TokenKind that token_str is a misspelling of . Otherwise return None .
fn suggested_kind_from(kind_list: &[TokenKind], token_str: &str) -> Option<TokenKind> {
        kind_list.iter().find_map(|x| {
            if Self::is_misspelled_kind(*x, token_str) {
                Some(*x)
            } else {
                None
            }
        })
    }
fn suggested_kind_from ( kind_list : & [ TokenKind ] , token_str : & str ) -> Option < TokenKind > { kind_list . iter ( ) . find_map ( | x | { if Self :: is_misspelled_kind ( * x , token_str ) { Some ( * x ) } else { None } } ) }
If token_str is a misspelling (by our narrow definition of misspelling)
of a TokenKind from kind_list, return the TokenKind that token_str is a
misspelling of.
If token_str is a misspelling ( by our narrow definition of misspelling ) of a TokenKind from kind_list return the TokenKind that token_str is a misspelling of .
kind_list
&[TokenKind]
token_str
&str
kind_list
&[TokenKind]
token_str
&str