change len == 0 to is_empty()

The original code was not compliant with the use of the Rust norm due to avoidance.
https://rust-lang.github.io/rust-clippy/master/index.html#len_zero
pull/1025/head
xBLACKICEx 3 years ago committed by GitHub
parent b5fd7d5eea
commit 10abdb1ffa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -71,7 +71,7 @@ fn main() {
let records = penguin_data.lines();
for (i, record) in records.enumerate() {
if i == 0 || record.trim().len() == 0 {
if i == 0 || record.trim().is_empty() {
continue;
}

Loading…
Cancel
Save