Skip to content

Commit 831e0e1

Browse files
committed
style: format error messages for consistency
1 parent dd8c1b2 commit 831e0e1

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

src/main.rs

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -135,14 +135,21 @@ fn main() -> Result<()> {
135135
let scan_dirs = get_scan_dirs(&cli_args.dir, &config_dir, &app_config.directories);
136136

137137
// Load commands from the first directory
138-
let mut commands_map = load_commands(&scan_dirs[0])
139-
.with_context(|| format!("Failed to load command definitions from {}", scan_dirs[0].display()))?;
138+
let mut commands_map = load_commands(&scan_dirs[0]).with_context(|| {
139+
format!(
140+
"Failed to load command definitions from {}",
141+
scan_dirs[0].display()
142+
)
143+
})?;
140144

141145
// Merge commands from remaining directories
142146
for extra_dir in scan_dirs.iter().skip(1) {
143147
if extra_dir.is_dir() {
144148
let extra_map = load_commands(extra_dir).with_context(|| {
145-
format!("Failed to load command definitions from {}", extra_dir.display())
149+
format!(
150+
"Failed to load command definitions from {}",
151+
extra_dir.display()
152+
)
146153
})?;
147154
for (name, cmd_def) in extra_map {
148155
if commands_map.contains_key(&name) {

0 commit comments

Comments
 (0)