@@ -110,12 +110,12 @@ pub fn analyze_lua_doc_file(
110110 let has_owner = comment. get_owner ( ) . is_some ( ) ;
111111
112112 let mut effective_version = direct_version. clone ( ) ;
113- if effective_version. is_none ( ) {
114- if let Some ( ( pending, pending_end) ) = pending_version. as_ref ( ) {
115- if has_owner && is_whitespace_between ( content , * pending_end , start ) {
116- effective_version = Some ( pending . clone ( ) ) ;
117- }
118- }
113+ if effective_version. is_none ( )
114+ && let Some ( ( pending, pending_end) ) = pending_version. as_ref ( )
115+ && has_owner
116+ && is_whitespace_between ( content , * pending_end , start )
117+ {
118+ effective_version = Some ( pending . clone ( ) ) ;
119119 }
120120
121121 for symbol in root_symbols_for_comment ( & comment, & raw_comment) {
@@ -687,10 +687,10 @@ fn preprocess_description(description: &str) -> String {
687687
688688 if let Some ( true ) = start_with_one_space {
689689 let mut chars = line. chars ( ) ;
690- if let Some ( first) = chars. next ( ) {
691- if first. is_whitespace ( ) {
692- line = chars . as_str ( ) ;
693- }
690+ if let Some ( first) = chars. next ( )
691+ && first. is_whitespace ( )
692+ {
693+ line = chars . as_str ( ) ;
694694 }
695695 }
696696
@@ -706,11 +706,11 @@ fn extract_version_suffix(comment: &LuaComment, raw_comment: &str) -> Option<Str
706706 for tag in comment. get_doc_tags ( ) {
707707 if let LuaDocTag :: Version ( version_tag) = tag {
708708 let raw = version_tag. syntax ( ) . text ( ) . to_string ( ) ;
709- if let Some ( remainder) = extract_version_remainder ( & raw ) {
710- if !remainder. is_empty ( ) {
711- let compact = remainder . split_whitespace ( ) . collect :: < String > ( ) ;
712- return Some ( format ! ( "@{compact}" ) ) ;
713- }
709+ if let Some ( remainder) = extract_version_remainder ( & raw )
710+ && !remainder. is_empty ( )
711+ {
712+ let compact = remainder . split_whitespace ( ) . collect :: < String > ( ) ;
713+ return Some ( format ! ( "@{compact}" ) ) ;
714714 }
715715 }
716716 }
0 commit comments