Skip to content

Commit 4303a6d

Browse files
Add clarifying comment to BackingStorage::drain_bytes().
1 parent e5add84 commit 4303a6d

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

measureme/src/serialization.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@ pub struct SerializationSink {
2121

2222
/// The `BackingStorage` is what the data gets written to.
2323
trait BackingStorage: Write + Send + Debug {
24+
/// Moves all data written so far out into a `Vec<u8>`. This method only
25+
/// exists so we can write unit tests that don't need to touch the
26+
/// file system. The method is allowed to unconditionally panic for
27+
/// non-test implementations.
2428
fn drain_bytes(&mut self) -> Vec<u8>;
2529
}
2630

0 commit comments

Comments
 (0)