Unverified Commit 01d75f69 authored by Tobias Koppers's avatar Tobias Koppers Committed by GitHub

Fix missing const generic parameter in turbo-persistence lookup call (#90817)

### What?

Fix a compilation error in `turbo-persistence` test code where the
`StaticSortedFile::lookup` call was missing the required `FIND_ALL`
const generic parameter.

### Why?

After the `FIND_ALL: bool` const generic was added to
`StaticSortedFile::lookup` in #90754, a call site in the test helper
`assert_corruption_detected` was not updated, causing `cargo check
--all-targets` to fail with:

```
error[E0284]: type annotations needed
  --> turbopack/crates/turbo-persistence/src/static_sorted_file_builder.rs:1661:19
     |
1661 |         match sst.lookup(entries[0].hash, &entries[0].key, &kc, &vc) {
     |                   ^^^^^^ cannot infer the value of the const parameter `FIND_ALL`
```

### How?

Added explicit turbofish `::<_, false>` to the `lookup` call in the test
helper. `false` is the appropriate value since the test only needs to
look up a single entry to verify corruption detection.
parent de1add25
...@@ -1658,7 +1658,7 @@ mod tests { ...@@ -1658,7 +1658,7 @@ mod tests {
let sst = open_sst(dir, seq, meta).unwrap(); let sst = open_sst(dir, seq, meta).unwrap();
let kc = make_cache(); let kc = make_cache();
let vc = make_cache(); let vc = make_cache();
match sst.lookup(entries[0].hash, &entries[0].key, &kc, &vc) { match sst.lookup::<_, false>(entries[0].hash, &entries[0].key, &kc, &vc) {
Err(err) => { Err(err) => {
let msg = format!("{err}"); let msg = format!("{err}");
assert!( assert!(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment