Skip to content

Commit

Permalink
refactor equals_small_set
Browse files Browse the repository at this point in the history
Summary: pull K1, K2 generics interfaces into one place

Reviewed By: IanChilds

Differential Revision: D64032250

fbshipit-source-id: dd4be026ab54a163b7c7443482affbb123ebfb3f
  • Loading branch information
perehonchuk authored and facebook-github-bot committed Oct 8, 2024
1 parent 5bb1c5c commit 75dedc6
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions starlark/src/values/comparison.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,10 @@ where
Ok(true)
}

pub(crate) fn equals_small_set<K1: Eq, K2: Eq>(xs: &SmallSet<K1>, ys: &SmallSet<K2>) -> bool
pub(crate) fn equals_small_set<K1, K2>(xs: &SmallSet<K1>, ys: &SmallSet<K2>) -> bool
where
K1: Equivalent<K2>,
K1: Equivalent<K2> + Eq,
K2: Eq,
{
if xs.len() != ys.len() {
return false;
Expand Down

0 comments on commit 75dedc6

Please sign in to comment.