refactor(tvix/castore): address clippy
We match to destructure a single pattern. Change-Id: I564a3510b4860e90b3315a9639effc48ee88b483 Reviewed-on: https://cl.tvl.fyi/c/depot/+/10233 Reviewed-by: tazjin <tazjin@tvl.su> Autosubmit: flokli <flokli@flokli.de> Tested-by: BuildkiteCI
This commit is contained in:
parent
340242174d
commit
22a669d27e
1 changed files with 7 additions and 10 deletions
|
@ -217,20 +217,17 @@ fn put_seek(blob_service: impl BlobService) {
|
|||
}
|
||||
|
||||
// seeking past the end…
|
||||
match r
|
||||
// should either be ok, but then return 0 bytes.
|
||||
// this matches the behaviour or a Cursor<Vec<u8>>.
|
||||
if let Ok(_pos) = r
|
||||
.seek(io::SeekFrom::Start(fixtures::BLOB_B.len() as u64 + 1))
|
||||
.await
|
||||
{
|
||||
// should either be ok, but then return 0 bytes.
|
||||
// this matches the behaviour or a Cursor<Vec<u8>>.
|
||||
Ok(_pos) => {
|
||||
let mut buf: Vec<u8> = Vec::new();
|
||||
r.read_to_end(&mut buf).await.expect("must not fail");
|
||||
assert!(buf.is_empty(), "expected no more data to be read");
|
||||
}
|
||||
// or not be okay.
|
||||
Err(_) => {}
|
||||
}
|
||||
|
||||
// TODO: this is only broken for the gRPC version
|
||||
// We expect seeking backwards or relative to the end to fail.
|
||||
|
|
Loading…
Reference in a new issue