Skip to content

Commit 1a37d68

Browse files
crawfxrdjackpot51
authored andcommitted
Ignore warnings when deleting ECTAG
Signed-off-by: Tim Crawford <[email protected]>
1 parent c5c68b7 commit 1a37d68

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

src/app/mod.rs

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -224,16 +224,15 @@ fn inner() -> Result<()> {
224224
} else {
225225
let c = if let Ok((_, ectag)) = find(ECTAG) {
226226
// Attempt to remove EC tag
227-
match (ectag.0.Delete)(ectag.0) {
228-
Status::SUCCESS => {
229-
println!("EC tag: deleted successfully");
227+
let status = (ectag.0.Delete)(ectag.0);
228+
// XXX: Match previous behavior, which ignored warnings.
229+
if !status.is_error() {
230+
println!("EC tag: deleted successfully");
230231

231-
// Have to prevent Close from being called after Delete
232-
mem::forget(ectag);
233-
}
234-
err => {
235-
println!("EC tag: failed to delete: {}", err);
236-
}
232+
// Have to prevent Close from being called after Delete
233+
mem::forget(ectag);
234+
} else {
235+
println!("EC tag: failed to delete: {}", status);
237236
}
238237

239238
// Skip enter if system76 ec flashing already occured

0 commit comments

Comments
 (0)