Skip to content

Commit

Permalink
lint fix for a rust update (#1209)
Browse files Browse the repository at this point in the history
  • Loading branch information
coffee-cup authored Oct 26, 2024
1 parent 05080e1 commit 1b278d4
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions src/providers/cobol.rs
Original file line number Diff line number Diff line change
Expand Up @@ -90,13 +90,10 @@ impl CobolProvider {
}

fn normalized_path(path: &PathBuf) -> Option<PathBuf> {
if let Some(normalized_path) = path.to_slash() {
let path_string = PathBuf::from_str(normalized_path.to_string().as_str());

if let Ok(path) = path_string {
return Some(path);
}
}
None
path.to_slash().and_then(|normalized_path| {
PathBuf::from_str(normalized_path.as_ref())
.map(Some)
.unwrap_or(None)
})
}
}

0 comments on commit 1b278d4

Please sign in to comment.