4 let x = vec![0x4141u16; N];
6 let mut y: Vec<u8> = unsafe { std::mem::transmute(x) };
7 unsafe { y.set_len(2 * N) };
9 println!("{:?}", std::str::from_utf8(&y).unwrap());
11 let mut x: Vec<u16> = unsafe { std::mem::transmute(y) };
12 unsafe { x.set_len(N) };