Skip to content

Commit c63ede5

Browse files
committed
refactor(cli): improve error handling formatting in edit command
- Reformatted the error handling logic in the `run_edit_set_command` function for better readability. - Enhanced clarity by using a multi-line format for the error message when file processing fails, maintaining consistent code style.
1 parent 884cbbc commit c63ede5

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

langcodec-cli/src/edit.rs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,14 @@ pub fn run_edit_set_command(opts: EditSetOptions) -> Result<(), String> {
192192
failures.len()
193193
);
194194

195-
if failures.is_empty() { Ok(()) } else { Err(format!("{} file(s) failed. See errors above.", failures.len())) }
195+
if failures.is_empty() {
196+
Ok(())
197+
} else {
198+
Err(format!(
199+
"{} file(s) failed. See errors above.",
200+
failures.len()
201+
))
202+
}
196203
}
197204

198205
#[allow(clippy::too_many_arguments)]

0 commit comments

Comments
 (0)