+2
-7
lines changedFilter options
+2
-7
lines changed Original file line number Diff line number Diff line change
@@ -509,13 +509,8 @@ impl AlignedVec {
509
509
/// assert_eq!(slice.len(), 3);
510
510
/// ```
511
511
#[inline]
512
-
pub fn into_boxed_slice(mut self) -> Box<[u8]> {
513
-
unsafe {
514
-
self.shrink_to_fit();
515
-
let slice_ptr = ptr_meta::from_raw_parts_mut(self.as_mut_ptr().cast(), self.len);
516
-
core::mem::forget(self);
517
-
Box::from_raw(slice_ptr)
518
-
}
512
+
pub fn into_boxed_slice(self) -> Box<[u8]> {
513
+
self.into_vec().into_boxed_slice()
519
514
}
520
515
521
516
/// Converts the vector into `Vec<u8>`.
You can’t perform that action at this time.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4