Skip to content

Commit ab271f0

Browse files
committed
whoops
1 parent 93d22bb commit ab271f0

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

crates/ty_python_semantic/src/types/constraints.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ impl<'db> ConstraintSet<'db> {
285285
}
286286

287287
pub(crate) fn display(self, db: &'db dyn Db) -> impl Display {
288-
self.node.simplify(db, self.node).display(db)
288+
self.node.simplify(db).display(db)
289289
}
290290
}
291291

@@ -617,7 +617,7 @@ impl<'db> Node<'db> {
617617
Node::AlwaysTrue => true,
618618
Node::AlwaysFalse => false,
619619
Node::Interior(_) => {
620-
let domain = self.domain(db, self);
620+
let domain = self.domain(db);
621621
let restricted = self.and(db, domain);
622622
restricted == domain
623623
}
@@ -917,22 +917,22 @@ impl<'db> Node<'db> {
917917
}
918918

919919
/// Simplifies a BDD, replacing constraints with simpler or smaller constraints where possible.
920-
fn simplify(self, db: &'db dyn Db, given: Node<'db>) -> Self {
920+
fn simplify(self, db: &'db dyn Db) -> Self {
921921
match self {
922922
Node::AlwaysTrue | Node::AlwaysFalse => self,
923923
Node::Interior(interior) => {
924-
let (simplified, _) = interior.simplify(db, given);
924+
let (simplified, _) = interior.simplify(db);
925925
simplified
926926
}
927927
}
928928
}
929929

930930
/// Returns the domain (the set of allowed inputs) for a BDD.
931-
fn domain(self, db: &'db dyn Db, given: Node<'db>) -> Self {
931+
fn domain(self, db: &'db dyn Db) -> Self {
932932
match self {
933933
Node::AlwaysTrue | Node::AlwaysFalse => Node::AlwaysTrue,
934934
Node::Interior(interior) => {
935-
let (_, domain) = interior.simplify(db, given);
935+
let (_, domain) = interior.simplify(db);
936936
domain
937937
}
938938
}
@@ -1221,7 +1221,7 @@ impl<'db> InteriorNode<'db> {
12211221
/// `x ∧ ¬y` is not a valid input, and is excluded from the BDD's domain. At the same time, we
12221222
/// can rewrite any occurrences of `x ∨ y` into `y`.
12231223
#[salsa::tracked(heap_size=ruff_memory_usage::heap_size)]
1224-
fn simplify(self, db: &'db dyn Db, _given: Node<'db>) -> (Node<'db>, Node<'db>) {
1224+
fn simplify(self, db: &'db dyn Db) -> (Node<'db>, Node<'db>) {
12251225
// To simplify a non-terminal BDD, we find all pairs of constraints that are mentioned in
12261226
// the BDD. If any of those pairs can be simplified to some other BDD, we perform a
12271227
// substitution to replace the pair with the simplification.

0 commit comments

Comments
 (0)