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(
341341 body,
342342 block : parent_block,
343343 function : parent_fn,
344- return_type : get_ret_type ( & f) ,
344+ return_type : get_ret_type ( f) ,
345345 arguments : f. param_list ( ) . map_or_else ( HashMap :: new, |args| {
346346 args. params ( )
347347 . filter_map ( |arg| {
@@ -447,13 +447,7 @@ fn get_doc_comments_and_attrs<T: HasDocComments>(block: &T) -> (Vec<String>, Vec
447447}
448448
449449fn 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 ( ) ) )
457451}
458452#[ derive( Debug , Clone , PartialEq , Eq ) ]
459453pub enum RustFilter {
You can’t perform that action at this time.
0 commit comments