Remove use of unsafe

dblsaiko
Mar 28, 2024, 12:09 AM
7O7J3GZEHPNQAUMXUOV64KX4ZCJV6XGLQYHQA34KVFMOWTFN3PDAC

Dependencies

  • [2] A3RM526Y Integrating identity malleability
  • [3] DO2Y5TY5 Tag synchronisation
  • [*] SXEYMYF7 Fixing the bad changes in history (unfortunately, by rebooting).

Change contents

  • replacement in libpijul/src/pristine/mod.rs at line 187
    [2.35704][2.35704:35924]()
    if b.len() < 16 {
    return None;
    }
    let mut x = RemoteId([0; 16]);
    unsafe {
    std::ptr::copy_nonoverlapping(b.as_ptr(), x.0.as_mut_ptr(), 16);
    }
    Some(x)
    [2.35704]
    [2.35924]
    Some(RemoteId(b.try_into().ok()?))