File tree Expand file tree Collapse file tree 1 file changed +11
-14
lines changed Expand file tree Collapse file tree 1 file changed +11
-14
lines changed Original file line number Diff line number Diff line change @@ -41,20 +41,17 @@ fn trim_comment(comment: &str) -> String {
4141
4242impl EarlyLintPass for EmptyDocs {
4343 fn check_attribute ( & mut self , cx : & EarlyContext < ' _ > , attribute : & Attribute ) {
44- match attribute. kind {
45- AttrKind :: DocComment ( _line, comment) => {
46- if trim_comment ( comment. as_str ( ) ) . len ( ) == 0 {
47- span_lint_and_help (
48- cx,
49- EMPTY_DOCS ,
50- attribute. span ,
51- "empty doc comment" ,
52- None ,
53- "consider removing or fill it" ,
54- ) ;
55- }
56- } ,
57- _ => { } ,
44+ if let AttrKind :: DocComment ( _line, comment) = attribute. kind {
45+ if trim_comment ( comment. as_str ( ) ) . len ( ) == 0 {
46+ span_lint_and_help (
47+ cx,
48+ EMPTY_DOCS ,
49+ attribute. span ,
50+ "empty doc comment" ,
51+ None ,
52+ "consider removing or fill it" ,
53+ ) ;
54+ }
5855 }
5956 }
6057}
You can’t perform that action at this time.
0 commit comments