Skip to content

Commit 7161f56

Browse files
sfacklerseanmonstar
authored andcommittedNov 16, 2023
feat(rt): Make ReadBuf::new public
1 parent b855475 commit 7161f56

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
 

‎src/rt/io.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -133,9 +133,9 @@ pub struct ReadBufCursor<'a> {
133133
}
134134

135135
impl<'data> ReadBuf<'data> {
136+
/// Create a new `ReadBuf` with a slice of initialized bytes.
136137
#[inline]
137-
#[cfg(test)]
138-
pub(crate) fn new(raw: &'data mut [u8]) -> Self {
138+
pub fn new(raw: &'data mut [u8]) -> Self {
139139
let len = raw.len();
140140
Self {
141141
// SAFETY: We never de-init the bytes ourselves.

0 commit comments

Comments
 (0)
Please sign in to comment.