mirror of https://github.com/astral-sh/ruff
RuleSelector implemented PartialOrd & Ord because ruff::flake8_to_ruff was using RuleSelector within a BTreeSet (which requires contained elements to implement Ord). There however is no inherent order to rule selectors, so PartialOrd & Ord should not be implemented. This commit changes BTreeSet<RuleSelector> to HashSet<RuleSelector> and adds an explicit sort calls based on the serialized strings, letting us drop the PartialOrd & Ord impls in favor of a Hash impl. |
||
|---|---|---|
| .. | ||
| config.rs | ||
| define_rule_mapping.rs | ||
| derive_message_formats.rs | ||
| lib.rs | ||
| rule_code_prefix.rs | ||
| rule_namespace.rs | ||