mirror of
https://github.com/astral-sh/ruff.git
synced 2025-12-23 09:19:39 +00:00
more cleanup
This commit is contained in:
parent
9fdb64dfca
commit
5fef55ff49
1 changed files with 3 additions and 5 deletions
|
|
@ -349,7 +349,7 @@ impl<'db> Conjunction<'db> {
|
|||
#[derive(Hash, PartialEq, Debug, Eq, Clone)]
|
||||
struct NarrowingConstraint<'db> {
|
||||
/// Disjunction of conjunctions (DNF)
|
||||
disjuncts: SmallVec<[Conjunction<'db>; 4]>,
|
||||
disjuncts: SmallVec<[Conjunction<'db>; 1]>,
|
||||
}
|
||||
|
||||
impl get_size2::GetSize for NarrowingConstraint<'_> {}
|
||||
|
|
@ -524,10 +524,8 @@ fn merge_constraints_or<'db>(
|
|||
.disjuncts
|
||||
.extend(from_constraint.disjuncts.clone());
|
||||
}
|
||||
Entry::Vacant(entry) => {
|
||||
// Place only appears in `from`, not in `into`.
|
||||
// Widen to object since the other branch doesn't constrain it.
|
||||
entry.insert(NarrowingConstraint::regular(Type::object()));
|
||||
Entry::Vacant(_) => {
|
||||
// Place only appears in `from`, not in `into`. No constraint needed.
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue