//! Because we can't #derive big arrays on stable smh use super::*; use std::{ fmt::{self, Debug,}, hash, }; impl Clone for Page { fn clone(&self) -> Self { #[inline(always)] fn copy_slice(dst: &mut [T], src: &[T]) { for (d, s) in dst.iter_mut().zip(src.iter()) { *d = s.clone() } } let mut new = init::blank_page(); copy_slice(&mut new[..], &self.0[..]); Self(new) } } impl Debug for Page { #[inline] fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { write!(f, "{:?}", &self.0[..]) } } impl Eq for Page{} impl PartialEq for Page { #[inline] fn eq(&self, other: &Self) -> bool { &self.0[..] == &other.0[..] } } impl hash::Hash for Page { #[inline] fn hash(&self, state: &mut H) { (&self.0[..]).hash(state) } }