aboutsummaryrefslogtreecommitdiff
path: root/src/command
diff options
context:
space:
mode:
authorRuben Beltran del Rio <git@r.bdr.sh>2025-10-07 13:56:20 +0200
committerRuben Beltran del Rio <git@r.bdr.sh>2025-10-07 13:56:20 +0200
commitb70bc1d6433fc0001336c968465fbe653921491c (patch)
tree17be596f5c512538000bccedfb2d47adfaf3da83 /src/command
parente953c7890abcbe6dfc612d4b307a7238cb2bb93c (diff)
Apply formatting
Diffstat (limited to 'src/command')
-rw-r--r--src/command/generate.rs14
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