@@ -148,17 +148,15 @@ pub(crate) fn external_docs(
148148 let node = token. parent ( ) ?;
149149 let definition = match_ast ! {
150150 match node {
151- ast:: NameRef ( name_ref) => match NameRefClass :: classify( sema, & name_ref) {
152- Some ( NameRefClass :: Definition ( def) ) => def,
153- Some ( NameRefClass :: FieldShorthand { local_ref: _, field_ref } ) => {
151+ ast:: NameRef ( name_ref) => match NameRefClass :: classify( sema, & name_ref) ? {
152+ NameRefClass :: Definition ( def) => def,
153+ NameRefClass :: FieldShorthand { local_ref: _, field_ref } => {
154154 Definition :: Field ( field_ref)
155155 }
156- None => return None ,
157156 } ,
158- ast:: Name ( name) => match NameClass :: classify( sema, & name) {
159- Some ( NameClass :: Definition ( it) | NameClass :: ConstReference ( it) ) => it,
160- Some ( NameClass :: PatFieldShorthand { local_def: _, field_ref } ) => Definition :: Field ( field_ref) ,
161- None => return None ,
157+ ast:: Name ( name) => match NameClass :: classify( sema, & name) ? {
158+ NameClass :: Definition ( it) | NameClass :: ConstReference ( it) => it,
159+ NameClass :: PatFieldShorthand { local_def: _, field_ref } => Definition :: Field ( field_ref) ,
162160 } ,
163161 _ => return None
164162 }
@@ -347,10 +345,10 @@ fn get_doc_links(
347345 web_url. as_mut ( ) . map ( |url| url. set_fragment ( frag. as_deref ( ) ) ) ;
348346 local_url. as_mut ( ) . map ( |url| url. set_fragment ( frag. as_deref ( ) ) ) ;
349347
350- return DocumentationLinks {
348+ DocumentationLinks {
351349 web_url : web_url. map ( |it| it. into ( ) ) ,
352350 local_url : local_url. map ( |it| it. into ( ) ) ,
353- } ;
351+ }
354352}
355353
356354fn rewrite_intra_doc_link (
0 commit comments