Clarify transmute example

This commit is contained in:
Giacomo Stevanato 2024-03-24 11:20:10 +01:00
parent 548e14b439
commit fb65ca14b2

View File

@ -1356,7 +1356,7 @@ pub const fn unlikely(b: bool) -> bool {
/// let v_clone = v_orig.clone();
///
/// // This is the suggested, safe way.
/// // It does copy the entire vector, though, into a new array.
/// // It may copy the entire vector into a new one though, but also may not.
/// let v_collected = v_clone.into_iter()
/// .map(Some)
/// .collect::<Vec<Option<&i32>>>();