@@ -180,10 +180,7 @@ impl Default for ByteString {
180
180
//
181
181
// #[unstable(feature = "bstr", issue = "134915")]
182
182
// 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.
187
184
// #[inline]
188
185
// fn from(s: &'a [u8; N]) -> Self {
189
186
// ByteString(s.as_slice().to_vec())
@@ -192,10 +189,7 @@ impl Default for ByteString {
192
189
//
193
190
// #[unstable(feature = "bstr", issue = "134915")]
194
191
// 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.
199
193
// #[inline]
200
194
// fn from(s: [u8; N]) -> Self {
201
195
// ByteString(s.as_slice().to_vec())
@@ -204,10 +198,7 @@ impl Default for ByteString {
204
198
//
205
199
// #[unstable(feature = "bstr", issue = "134915")]
206
200
// 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.
211
202
// #[inline]
212
203
// fn from(s: &'a [u8]) -> Self {
213
204
// ByteString(s.to_vec())
@@ -236,10 +227,7 @@ impl From<ByteString> for Vec<u8> {
236
227
//
237
228
// #[unstable(feature = "bstr", issue = "134915")]
238
229
// 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.
243
231
// #[inline]
244
232
// fn from(s: &'a str) -> Self {
245
233
// ByteString(s.as_bytes().to_vec())
0 commit comments