error: usage of `HashSet::insert` after `HashSet::contains` --> tests/ui/set_contains_or_insert.rs:12:13 | LL | if !set.contains(&value) { | ^^^^^^^^^^^^^^^^ LL | LL | set.insert(value); | ^^^^^^^^^^^^^ | = note: `-D clippy::set-contains-or-insert` implied by `-D warnings` = help: to override `-D warnings` add `#[allow(clippy::set_contains_or_insert)]` error: usage of `HashSet::insert` after `HashSet::contains` --> tests/ui/set_contains_or_insert.rs:18:12 | LL | if set.contains(&value) { | ^^^^^^^^^^^^^^^^ LL | LL | set.insert(value); | ^^^^^^^^^^^^^ error: usage of `HashSet::insert` after `HashSet::contains` --> tests/ui/set_contains_or_insert.rs:24:13 | LL | if !set.contains(&value) { | ^^^^^^^^^^^^^^^^ LL | LL | set.insert(value); | ^^^^^^^^^^^^^ error: usage of `HashSet::insert` after `HashSet::contains` --> tests/ui/set_contains_or_insert.rs:29:14 | LL | if !!set.contains(&value) { | ^^^^^^^^^^^^^^^^ LL | LL | set.insert(value); | ^^^^^^^^^^^^^ error: usage of `HashSet::insert` after `HashSet::contains` --> tests/ui/set_contains_or_insert.rs:35:15 | LL | if (&set).contains(&value) { | ^^^^^^^^^^^^^^^^ LL | LL | set.insert(value); | ^^^^^^^^^^^^^ error: usage of `HashSet::insert` after `HashSet::contains` --> tests/ui/set_contains_or_insert.rs:41:13 | LL | if !set.contains(borrow_value) { | ^^^^^^^^^^^^^^^^^^^^^^ LL | LL | set.insert(*borrow_value); | ^^^^^^^^^^^^^^^^^^^^^ error: usage of `HashSet::insert` after `HashSet::contains` --> tests/ui/set_contains_or_insert.rs:47:20 | LL | if !borrow_set.contains(&value) { | ^^^^^^^^^^^^^^^^ LL | LL | borrow_set.insert(value); | ^^^^^^^^^^^^^ error: usage of `BTreeSet::insert` after `BTreeSet::contains` --> tests/ui/set_contains_or_insert.rs:86:13 | LL | if !set.contains(&value) { | ^^^^^^^^^^^^^^^^ LL | LL | set.insert(value); | ^^^^^^^^^^^^^ error: usage of `BTreeSet::insert` after `BTreeSet::contains` --> tests/ui/set_contains_or_insert.rs:92:12 | LL | if set.contains(&value) { | ^^^^^^^^^^^^^^^^ LL | LL | set.insert(value); | ^^^^^^^^^^^^^ error: usage of `BTreeSet::insert` after `BTreeSet::contains` --> tests/ui/set_contains_or_insert.rs:98:13 | LL | if !set.contains(&value) { | ^^^^^^^^^^^^^^^^ LL | LL | set.insert(value); | ^^^^^^^^^^^^^ error: usage of `BTreeSet::insert` after `BTreeSet::contains` --> tests/ui/set_contains_or_insert.rs:103:14 | LL | if !!set.contains(&value) { | ^^^^^^^^^^^^^^^^ LL | LL | set.insert(value); | ^^^^^^^^^^^^^ error: usage of `BTreeSet::insert` after `BTreeSet::contains` --> tests/ui/set_contains_or_insert.rs:109:15 | LL | if (&set).contains(&value) { | ^^^^^^^^^^^^^^^^ LL | LL | set.insert(value); | ^^^^^^^^^^^^^ error: usage of `BTreeSet::insert` after `BTreeSet::contains` --> tests/ui/set_contains_or_insert.rs:115:13 | LL | if !set.contains(borrow_value) { | ^^^^^^^^^^^^^^^^^^^^^^ LL | LL | set.insert(*borrow_value); | ^^^^^^^^^^^^^^^^^^^^^ error: usage of `BTreeSet::insert` after `BTreeSet::contains` --> tests/ui/set_contains_or_insert.rs:121:20 | LL | if !borrow_set.contains(&value) { | ^^^^^^^^^^^^^^^^ LL | LL | borrow_set.insert(value); | ^^^^^^^^^^^^^ error: aborting due to 14 previous errors