Skip to content

Commit cb4e888

Browse files
committed
SplitStreamReader: Add lookup_external_ref()
This lets you look up a ref digest from the splitstream by index and is needed by the ostree code.
1 parent f4b4606 commit cb4e888

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

crates/composefs/src/splitstream.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -532,6 +532,11 @@ impl<ObjectID: FsVerityHashValue> SplitStreamReader<ObjectID> {
532532
self.named_refs
533533
}
534534

535+
/// Look up the digest of an external reference by index
536+
pub fn lookup_external_ref(&self, idx: usize) -> Option<&ObjectID> {
537+
return self.object_refs.get(idx);
538+
}
539+
535540
fn ensure_chunk(
536541
&mut self,
537542
eof_ok: bool,

0 commit comments

Comments
 (0)