Skip to content
Snippets Groups Projects
Unverified Commit 846ec8f8 authored by Jörg Sommer's avatar Jörg Sommer Committed by Jan Alexander Steffens (heftig)
Browse files

Convert `len() > 0` to `! is_empty()`

`cargo clippy` suggested to use `is_empty()` instead of `len() > 0`,
because this doesn't require to calculate the whole length of the sequence.

See: <https://rust-lang.github.io/rust-clippy/master/index.html#len_zero>
parent f9d35703
No related branches found
No related tags found
No related merge requests found
......@@ -255,7 +255,7 @@ fn main() {
sg
)
.unwrap();
if new_entry.state_map.len() > 0 {
if !new_entry.state_map.is_empty() {
writeln!(output, "INSERT INTO state_groups_state (state_group, room_id, type, state_key, event_id) VALUES").unwrap();
let mut first = true;
for ((t, s), e) in new_entry.state_map.iter() {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment