diff --git a/phf/src/ordered_set.rs b/phf/src/ordered_set.rs index 1abc96af..3c4d53a3 100644 --- a/phf/src/ordered_set.rs +++ b/phf/src/ordered_set.rs @@ -94,7 +94,7 @@ impl OrderedSet { impl OrderedSet where T: Eq + PhfHash { /// Returns true if `other` shares no elements with `self`. #[inline] - pub fn is_disjoisize(&self, other: &OrderedSet) -> bool { + pub fn is_disjoint(&self, other: &OrderedSet) -> bool { !self.iter().any(|value| other.contains(value)) } diff --git a/phf/src/set.rs b/phf/src/set.rs index ddeb80bf..485996af 100644 --- a/phf/src/set.rs +++ b/phf/src/set.rs @@ -84,7 +84,7 @@ impl Set { impl Set where T: Eq + PhfHash { /// Returns true if `other` shares no elements with `self`. - pub fn is_disjoisize(&self, other: &Set) -> bool { + pub fn is_disjoint(&self, other: &Set) -> bool { !self.iter().any(|value| other.contains(value)) }