Skip to content

Commit

Permalink
validate: make clippy happy
Browse files Browse the repository at this point in the history
warning: redundant else block
   --> src/cmd/validate.rs:273:28
    |
273 |                       } else {
    |  ____________________________^
274 | |                         return fail_clierror!("Header Validation error: {e}.");
275 | |                     }
    | |_____________________^
    |
    = help: remove the `else` block and move the contents out
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_else
    = note: `-W clippy::redundant-else` implied by `-W clippy::pedantic`

[skip ci]
  • Loading branch information
jqnatividad committed Aug 31, 2023
1 parent 6e0152e commit e0184e2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/cmd/validate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -270,9 +270,9 @@ pub fn run(argv: &[&str]) -> CliResult<()> {
You may also want to transcode your data to UTF-8 first using `iconv` \
or `recode`."
);
} else {
return fail_clierror!("Header Validation error: {e}.");
}
// its not a UTF-8 error, report a generic header validation error
return fail_clierror!("Header Validation error: {e}.");
},
}
}
Expand Down

0 comments on commit e0184e2

Please sign in to comment.