Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit ae2fc1e

Browse files
committedNov 16, 2023
feat(rt): Make ReadBuf::new public
1 parent f1bb2aa commit ae2fc1e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
 

‎src/rt/io.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,9 +132,9 @@ pub struct ReadBufCursor<'a> {
132132
}
133133

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

0 commit comments

Comments
 (0)
Please sign in to comment.