rust: fix clippy lint for bool_assert_comparison

Checking for is_empty is faster than checking for equality.
pull/7966/head
Jason Ish 2 years ago committed by Victor Julien
parent f60e1b30f6
commit f3e4bcfe23

@ -469,7 +469,7 @@ mod tests {
nbytes: nbytes, nbytes: nbytes,
offset: offset, offset: offset,
oper: oper, oper: oper,
rvalue_str: if rvalue_str != "" { rvalue_str: if !rvalue_str.is_empty() {
CString::new(rvalue_str).unwrap().into_raw() CString::new(rvalue_str).unwrap().into_raw()
} else { } else {
std::ptr::null_mut() std::ptr::null_mut()

Loading…
Cancel
Save