---
source: crates/ruff_linter/src/rules/refurb/mod.rs
---
FURB132 [*] Use `s.discard("x")` instead of check and `remove`
  --> FURB132.py:12:1
   |
11 |   # FURB132
12 | / if "x" in s:
13 | |     s.remove("x")
   | |_________________^
   |
help: Replace with `s.discard("x")`
   |
11 | # FURB132
   - if "x" in s:
   -     s.remove("x")
12 + s.discard("x")
13 |
   |
note: This is an unsafe fix and may change runtime behavior

FURB132 [*] Use `s3.discard("x")` instead of check and `remove`
  --> FURB132.py:22:1
   |
21 |   # FURB132
22 | / if "x" in s3:
23 | |     s3.remove("x")
   | |__________________^
   |
help: Replace with `s3.discard("x")`
   |
21 | # FURB132
   - if "x" in s3:
   -     s3.remove("x")
22 + s3.discard("x")
23 |
   |
note: This is an unsafe fix and may change runtime behavior

FURB132 [*] Use `s.discard(var)` instead of check and `remove`
  --> FURB132.py:28:1
   |
26 |   var = "y"
27 |   # FURB132
28 | / if var in s:
29 | |     s.remove(var)
   | |_________________^
   |
help: Replace with `s.discard(var)`
   |
27 | # FURB132
   - if var in s:
   -     s.remove(var)
28 + s.discard(var)
29 |
   |
note: This is an unsafe fix and may change runtime behavior

FURB132 [*] Use `s.discard(f"{var}:{var}")` instead of check and `remove`
  --> FURB132.py:32:1
   |
32 | / if f"{var}:{var}" in s:
33 | |     s.remove(f"{var}:{var}")
   | |____________________________^
   |
help: Replace with `s.discard(f"{var}:{var}")`
   |
31 |
   - if f"{var}:{var}" in s:
   -     s.remove(f"{var}:{var}")
32 + s.discard(f"{var}:{var}")
33 |
   |
note: This is an unsafe fix and may change runtime behavior
