Skip to content

Commit

Permalink
refactor: flatten dir entries
Browse files Browse the repository at this point in the history
  • Loading branch information
hougesen committed Mar 5, 2024
1 parent 48eb6bb commit bcdc85a
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,12 @@ fn format_command(args: FormatCommandArguments) -> std::io::Result<()> {
.require_git(false)
.hidden(true)
.build()
.flatten()
{
if let Ok(d) = entry {
let file_path = d.path();
let file_path = entry.path();

if file_path.extension() == Some(&OsStr::from("md")) {
format_file(file_path)?;
}
if file_path.extension() == Some(&OsStr::from("md")) {
format_file(file_path)?;
}
}
}
Expand Down

0 comments on commit bcdc85a

Please sign in to comment.