diff options
| author | Ruben Beltran del Rio <git@r.bdr.sh> | 2025-10-07 13:56:20 +0200 |
|---|---|---|
| committer | Ruben Beltran del Rio <git@r.bdr.sh> | 2025-10-07 13:56:20 +0200 |
| commit | b70bc1d6433fc0001336c968465fbe653921491c (patch) | |
| tree | 17be596f5c512538000bccedfb2d47adfaf3da83 /src/command | |
| parent | e953c7890abcbe6dfc612d4b307a7238cb2bb93c (diff) | |
Apply formatting
Diffstat (limited to 'src/command')
| -rw-r--r-- | src/command/generate.rs | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/command/generate.rs b/src/command/generate.rs index 33ea6a4..966c26b 100644 --- a/src/command/generate.rs +++ b/src/command/generate.rs @@ -33,13 +33,13 @@ impl Generate { let entries = read_dir(post_path).ok()?; for entry in entries.filter_map(Result::ok) { let entry_path = entry.path(); - if let Some(extension) = entry_path.extension() { - if extension == "gmi" { - let mut file = File::open(entry_path).ok()?; - let mut contents = String::new(); - file.read_to_string(&mut contents).ok()?; - return Some(contents); - } + if let Some(extension) = entry_path.extension() + && extension == "gmi" + { + let mut file = File::open(entry_path).ok()?; + let mut contents = String::new(); + file.read_to_string(&mut contents).ok()?; + return Some(contents); } } None |