Cleanup convert_path

This commit is contained in:
Lukas Wirth 2024-01-25 10:23:00 +01:00
parent 880baa9e56
commit d8ef6c24cc
4 changed files with 34 additions and 42 deletions

View file

@ -131,7 +131,7 @@ impl CfgDiff {
/// of both.
pub fn new(enable: Vec<CfgAtom>, disable: Vec<CfgAtom>) -> Option<CfgDiff> {
let mut occupied = FxHashSet::default();
if enable.iter().chain(disable.iter()).any(|item| occupied.insert(item)) {
if enable.iter().chain(disable.iter()).any(|item| !occupied.insert(item)) {
// was present
return None;
}