From 7161f56274a30bfbe4a718bbe21d35beaf86b00b Mon Sep 17 00:00:00 2001 From: Steven Fackler Date: Wed, 15 Nov 2023 19:52:07 -0500 Subject: [PATCH] feat(rt): Make ReadBuf::new public --- src/rt/io.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/rt/io.rs b/src/rt/io.rs index 793103c339..fbe9ecc901 100644 --- a/src/rt/io.rs +++ b/src/rt/io.rs @@ -133,9 +133,9 @@ pub struct ReadBufCursor<'a> { } impl<'data> ReadBuf<'data> { + /// Create a new `ReadBuf` with a slice of initialized bytes. #[inline] - #[cfg(test)] - pub(crate) fn new(raw: &'data mut [u8]) -> Self { + pub fn new(raw: &'data mut [u8]) -> Self { let len = raw.len(); Self { // SAFETY: We never de-init the bytes ourselves.