Skip to content

Commit a743704

Browse files
committed
refactor(cli): Remove unused return value
1 parent 761c465 commit a743704

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/cargo/lib.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -206,14 +206,14 @@ pub fn display_warning_with_error(warning: &str, err: &Error, shell: &mut Shell)
206206
_display_error(err, shell, false);
207207
}
208208

209-
fn _display_error(err: &Error, shell: &mut Shell, as_err: bool) -> bool {
209+
fn _display_error(err: &Error, shell: &mut Shell, as_err: bool) {
210210
for (i, err) in err.chain().enumerate() {
211211
// If we're not in verbose mode then only print cause chain until one
212212
// marked as `VerboseError` appears.
213213
//
214214
// Generally the top error shouldn't be verbose, but check it anyways.
215215
if shell.verbosity() != Verbose && err.is::<VerboseError>() {
216-
return true;
216+
break;
217217
}
218218
if err.is::<AlreadyPrintedError>() {
219219
break;
@@ -229,5 +229,4 @@ fn _display_error(err: &Error, shell: &mut Shell, as_err: bool) -> bool {
229229
drop(write!(shell.err(), "{}", indented_lines(&err.to_string())));
230230
}
231231
}
232-
false
233232
}

0 commit comments

Comments
 (0)