Skip to content

Commit

Permalink
Prefer not is empty over len greater than zero
Browse files Browse the repository at this point in the history
  • Loading branch information
carols10cents committed Nov 17, 2016
1 parent 1423f87 commit b17eeda
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/category.rs
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ impl Category {
.cloned()
.collect();

if to_rm.len() > 0 {
if !to_rm.is_empty() {
try!(conn.execute("DELETE FROM crates_categories \
WHERE category_id = ANY($1) \
AND crate_id = $2",
Expand Down

0 comments on commit b17eeda

Please sign in to comment.