@@ -180,10 +180,7 @@ impl Default for ByteString {
180180//
181181// #[unstable(feature = "bstr", issue = "134915")]
182182// impl<'a, const N: usize> From<&'a [u8; N]> for ByteString {
183- // /// Make a `ByteString` from a byte array ref.
184- // ///
185- // /// ## Cost
186- // /// Allocates a new `Vec`
183+ // /// Allocate a new `ByteString` with a copy of the bytes in the array.
187184// #[inline]
188185// fn from(s: &'a [u8; N]) -> Self {
189186// ByteString(s.as_slice().to_vec())
@@ -192,10 +189,7 @@ impl Default for ByteString {
192189//
193190// #[unstable(feature = "bstr", issue = "134915")]
194191// impl<const N: usize> From<[u8; N]> for ByteString {
195- // /// Make a `ByteString` from a byte array.
196- // ///
197- // /// ## Cost
198- // /// Allocates a new `Vec`
192+ // /// Allocate a new `ByteString` with a copy of the bytes in the array.
199193// #[inline]
200194// fn from(s: [u8; N]) -> Self {
201195// ByteString(s.as_slice().to_vec())
@@ -204,10 +198,7 @@ impl Default for ByteString {
204198//
205199// #[unstable(feature = "bstr", issue = "134915")]
206200// impl<'a> From<&'a [u8]> for ByteString {
207- // /// Make a `ByteString` from a byte slice.
208- // ///
209- // /// ## Cost
210- // /// Allocates a new `Vec`
201+ // /// Allocate a new `ByteString` with a copy of the bytes in the array.
211202// #[inline]
212203// fn from(s: &'a [u8]) -> Self {
213204// ByteString(s.to_vec())
@@ -236,10 +227,7 @@ impl From<ByteString> for Vec<u8> {
236227//
237228// #[unstable(feature = "bstr", issue = "134915")]
238229// impl<'a> From<&'a str> for ByteString {
239- // /// Make a `ByteString` from a string slices bytes.
240- // ///
241- // /// ## Cost
242- // /// Allocates a new `Vec`
230+ // /// Allocate a new `ByteString` with a copy of the bytes in the slice.
243231// #[inline]
244232// fn from(s: &'a str) -> Self {
245233// ByteString(s.as_bytes().to_vec())
0 commit comments