Resolve clippy::len_zero
error: length comparison to one --> src/shims/posix/thread.rs:102:12 | 102 | if args.len() < 1 { | ^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `args.is_empty()` | = note: `-D clippy::len-zero` implied by `-D clippy::all` = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero
This commit is contained in:
parent
1fa63f1e9b
commit
168e87682f
@ -17,7 +17,6 @@
|
||||
clippy::field_reassign_with_default,
|
||||
clippy::from_over_into,
|
||||
clippy::if_same_then_else,
|
||||
clippy::len_zero,
|
||||
clippy::manual_map,
|
||||
clippy::mem_replace_with_default,
|
||||
clippy::needless_borrow,
|
||||
|
@ -99,7 +99,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
|
||||
let this = self.eval_context_mut();
|
||||
this.assert_target_os("linux", "prctl");
|
||||
|
||||
if args.len() < 1 {
|
||||
if args.is_empty() {
|
||||
throw_ub_format!(
|
||||
"incorrect number of arguments for `prctl`: got {}, expected at least 1",
|
||||
args.len()
|
||||
|
Loading…
x
Reference in New Issue
Block a user