Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/aienux/blob/main/vendor/generic-array/src/impl_zeroize.rs # aienux Aienux, the AienOS kernel: boot, scheduling, IPC and capability boundaries. Pre-alpha; host, emulator and physical evidence are labelled separately. Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `main` Branches Tags History `aienux / vendor / generic-array / src / impl_zeroize.rs` 24 lines ยท 510 bytes Raw Blame History 1 use crate::{ArrayLength, GenericArray}; 2 3 use zeroize::Zeroize; 4 5 impl> Zeroize for GenericArray { 6 fn zeroize(&mut self) { 7 self.as_mut_slice().iter_mut().zeroize() 8 } 9 } 10 11 #[cfg(test)] 12 mod tests { 13 use super::*; 14 15 #[test] 16 fn test_zeroize() { 17 let mut array = GenericArray::::default(); 18 array[0] = 4; 19 array[1] = 9; 20 array.zeroize(); 21 assert_eq!(array[0], 0); 22 assert_eq!(array[1], 0); 23 } 24 }