use crate::constants::constants_system::SIZE_32KB; use crate::periph::at28c256::At28C256; use crate::periph::hm62256::Hm62256; impl Default for At28C256 { fn default() -> Self { let vec = vec![0xea; SIZE_32KB]; let boxed_slice: Box<[u8]> = vec.into_boxed_slice(); let boxed_array: Box<[u8; SIZE_32KB]> = boxed_slice .try_into() .expect("Failed to convert Vec to boxed array"); At28C256 { data: boxed_array } } } #[cfg(test)] mod test { use super::*; #[test] fn smoke() { assert!(true); } }