Skip to content

Commit fdea8cc

Browse files
committed
appease miri
1 parent 61eb481 commit fdea8cc

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -697,7 +697,7 @@ impl<T> ThinVec<T> {
697697
/// While the following example is sound, there is a memory leak since
698698
/// the inner vectors were not freed prior to the `set_len` call:
699699
///
700-
/// ```
700+
/// ```no_run
701701
/// use thin_vec::thin_vec;
702702
///
703703
/// let mut vec = thin_vec![thin_vec![1, 0, 0],
@@ -2069,7 +2069,7 @@ impl<T, const N: usize> TryFrom<ThinVec<T>> for [T; N] {
20692069
// We checked earlier that we have sufficient items.
20702070
// The items will not double-drop as the `set_len`
20712071
// tells the `ThinVec` not to also drop them.
2072-
let array = unsafe { ptr::read(vec.as_ptr() as *const [T; N]) };
2072+
let array = unsafe { ptr::read(vec.data_raw() as *const [T; N]) };
20732073
Ok(array)
20742074
}
20752075
}

0 commit comments

Comments
 (0)