We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e407ca2 commit 7850d99Copy full SHA for 7850d99
src/boxed.rs
@@ -178,7 +178,7 @@ impl From<String> for BoxedString {
178
let len = s.len();
179
let cap = s.capacity();
180
#[allow(unsafe_code)]
181
- let ptr = unsafe { NonNull::new_unchecked(s.as_mut_ptr()) };
+ let ptr = unsafe { NonNull::new_unchecked(s.as_mut_vec().as_mut_ptr()) };
182
let old_layout = Layout::array::<u8>(cap).unwrap();
183
184
use alloc::alloc::Allocator;
0 commit comments