mirror of
https://github.com/salsa-rs/salsa.git
synced 2025-01-22 12:56:33 +00:00
Merge pull request #634 from Veykril/veykril/push-psprrykkzwvo
Fix `Lookup<Vec<T>>` impls
This commit is contained in:
commit
803d4a0714
1 changed files with 2 additions and 6 deletions
|
@ -394,9 +394,7 @@ impl Lookup<String> for &str {
|
|||
|
||||
impl<A: Hash + Eq + PartialEq<T> + Clone + Lookup<T>, T> Lookup<Vec<T>> for &[A] {
|
||||
fn hash<H: Hasher>(&self, h: &mut H) {
|
||||
for a in *self {
|
||||
Hash::hash(a, h);
|
||||
}
|
||||
Hash::hash(self, h);
|
||||
}
|
||||
|
||||
fn eq(&self, data: &Vec<T>) -> bool {
|
||||
|
@ -410,9 +408,7 @@ impl<A: Hash + Eq + PartialEq<T> + Clone + Lookup<T>, T> Lookup<Vec<T>> for &[A]
|
|||
|
||||
impl<const N: usize, A: Hash + Eq + PartialEq<T> + Clone + Lookup<T>, T> Lookup<Vec<T>> for [A; N] {
|
||||
fn hash<H: Hasher>(&self, h: &mut H) {
|
||||
for a in self {
|
||||
Hash::hash(a, h);
|
||||
}
|
||||
Hash::hash(self, h);
|
||||
}
|
||||
|
||||
fn eq(&self, data: &Vec<T>) -> bool {
|
||||
|
|
Loading…
Reference in a new issue