Skip to content

Commit

Permalink
Fix wrong inferred type in test_filtered_scanning
Browse files Browse the repository at this point in the history
The test incorrectly assumed HSCAN returns a vec of usize, whereas HSCAN
returns the field value pairs.
  • Loading branch information
valkum authored and jaymell committed May 18, 2022
1 parent 850f5f9 commit a320058
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tests/test_basic.rs
Expand Up @@ -235,12 +235,12 @@ fn test_filtered_scanning() {
}
}

let iter = con.hscan_match("foo", "key_0_*").unwrap();
let iter = con
.hscan_match::<&str, &str, (String, usize)>("foo", "key_0_*")
.unwrap();

for x in iter {
// type inference limitations
let x: usize = x;
unseen.remove(&x);
for (_field, value) in iter {
unseen.remove(&value);
}

assert_eq!(unseen.len(), 0);
Expand Down

0 comments on commit a320058

Please sign in to comment.