@@ -148,17 +148,15 @@ pub(crate) fn external_docs(
148
148
let node = token. parent ( ) ?;
149
149
let definition = match_ast ! {
150
150
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 } => {
154
154
Definition :: Field ( field_ref)
155
155
}
156
- None => return None ,
157
156
} ,
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) ,
162
160
} ,
163
161
_ => return None
164
162
}
@@ -347,10 +345,10 @@ fn get_doc_links(
347
345
web_url. as_mut ( ) . map ( |url| url. set_fragment ( frag. as_deref ( ) ) ) ;
348
346
local_url. as_mut ( ) . map ( |url| url. set_fragment ( frag. as_deref ( ) ) ) ;
349
347
350
- return DocumentationLinks {
348
+ DocumentationLinks {
351
349
web_url : web_url. map ( |it| it. into ( ) ) ,
352
350
local_url : local_url. map ( |it| it. into ( ) ) ,
353
- } ;
351
+ }
354
352
}
355
353
356
354
fn rewrite_intra_doc_link (
0 commit comments