We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 61eb481 commit fdea8ccCopy full SHA for fdea8cc
1 file changed
src/lib.rs
@@ -697,7 +697,7 @@ impl<T> ThinVec<T> {
697
/// While the following example is sound, there is a memory leak since
698
/// the inner vectors were not freed prior to the `set_len` call:
699
///
700
- /// ```
+ /// ```no_run
701
/// use thin_vec::thin_vec;
702
703
/// 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] {
2069
// We checked earlier that we have sufficient items.
2070
// The items will not double-drop as the `set_len`
2071
// tells the `ThinVec` not to also drop them.
2072
- let array = unsafe { ptr::read(vec.as_ptr() as *const [T; N]) };
+ let array = unsafe { ptr::read(vec.data_raw() as *const [T; N]) };
2073
Ok(array)
2074
}
2075
0 commit comments