Alessandro Decina 49319b4206 uninit_vec: special case set_len(0)
set_len(0) does not create uninitialized elements. Fixes a false positive with
the following pattern:

    fn copy_slice_into_vec(dst: &mut Vec<u8>, src: &[u8]) {
        dst.reserve(src.len().saturating_sub(dst.len()));
        unsafe {
            dst.set_len(0);
            std::ptr::copy_nonoverlapping(src.as_ptr(), dst.as_mut_ptr(), src.len());
            dst.set_len(src.len());
        }
    }
2022-09-23 09:35:47 +01:00
..
2022-09-13 10:35:59 +02:00
2022-09-02 13:03:11 -05:00
2022-09-08 20:18:02 +00:00
2022-09-08 20:18:02 +00:00
2022-09-08 20:18:02 +00:00
2022-08-31 15:24:40 +02:00
2022-09-16 13:59:51 +05:30
2022-09-08 20:18:02 +00:00
2022-09-08 20:18:02 +00:00
2022-09-08 20:18:02 +00:00