File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -354,7 +354,7 @@ pub fn get_status(
354354 let mut res = Vec :: with_capacity ( statuses. len ( ) ) ;
355355
356356 for entry in statuses. iter ( ) {
357- let Some ( path) = entry. path ( ) else {
357+ let Ok ( path) = entry. path ( ) else {
358358 continue ;
359359 } ;
360360
Original file line number Diff line number Diff line change @@ -109,6 +109,8 @@ pub fn get_tags(repo_path: &RepoPath) -> Result<Tags> {
109109 let tag_names = repo. tag_names ( None ) ?;
110110
111111 for name in tag_names. iter ( ) . flatten ( ) {
112+ let Some ( name) = name else { continue } ;
113+
112114 let reference = match repo. find_reference (
113115 & format ! ( "refs/tags/{name}" ) ,
114116 ) {
@@ -121,7 +123,8 @@ pub fn get_tags(repo_path: &RepoPath) -> Result<Tags> {
121123
122124 if let ( Some ( commit_id) , Ok ( tag) ) = ( target, tag) {
123125 let name = tag. name ( ) . unwrap_or ( name) . to_string ( ) ;
124- let annotation = tag. message ( ) . map ( |s| s. to_string ( ) ) ;
126+ let annotation =
127+ tag. message ( ) ?. map ( ToString :: to_string) ;
125128 adder ( commit_id. into ( ) , Tag { name, annotation } ) ;
126129 } else if let Some ( commit_id) = target {
127130 adder ( commit_id. into ( ) , Tag :: new ( name) ) ;
You can’t perform that action at this time.
0 commit comments