Skip to content

Commit f658240

Browse files
committed
add ZeroCopyBoxIoBuf::new_uninit method
1 parent a0a8e54 commit f658240

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

libsql-wal/src/io/buf.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,10 @@ impl<T> ZeroCopyBoxIoBuf<T> {
132132
}
133133
}
134134

135+
pub fn new_uninit(inner: Box<T>) -> Self {
136+
Self { init: 0, inner }
137+
}
138+
135139
fn is_init(&self) -> bool {
136140
self.init == size_of::<T>()
137141
}

0 commit comments

Comments
 (0)