File tree Expand file tree Collapse file tree 1 file changed +2
-8
lines changed
git-function-history-lib/src/languages Expand file tree Collapse file tree 1 file changed +2
-8
lines changed Original file line number Diff line number Diff line change @@ -341,7 +341,7 @@ pub(crate) fn find_function_in_file(
341
341
body,
342
342
block : parent_block,
343
343
function : parent_fn,
344
- return_type : get_ret_type ( & f) ,
344
+ return_type : get_ret_type ( f) ,
345
345
arguments : f. param_list ( ) . map_or_else ( HashMap :: new, |args| {
346
346
args. params ( )
347
347
. filter_map ( |arg| {
@@ -447,13 +447,7 @@ fn get_doc_comments_and_attrs<T: HasDocComments>(block: &T) -> (Vec<String>, Vec
447
447
}
448
448
449
449
fn get_ret_type ( fns : & Fn ) -> Option < String > {
450
- match fns. ret_type ( ) {
451
- Some ( ret) => match ret. ty ( ) {
452
- Some ( ty) => Some ( ty. to_string ( ) ) ,
453
- None => None ,
454
- } ,
455
- None => None ,
456
- }
450
+ fns. ret_type ( ) . and_then ( |ret| ret. ty ( ) . map ( |ty| ty. to_string ( ) ) )
457
451
}
458
452
#[ derive( Debug , Clone , PartialEq , Eq ) ]
459
453
pub enum RustFilter {
You can’t perform that action at this time.
0 commit comments