add defaults for the several structs
This commit is contained in:
committed by
Sébastien Crozet
parent
1608a1323e
commit
536122e080
@@ -52,10 +52,16 @@ pub struct Index {
|
||||
generation: u32,
|
||||
}
|
||||
|
||||
impl IndexedData for Index {
|
||||
impl Default for Index {
|
||||
fn default() -> Self {
|
||||
Self::from_raw_parts(crate::INVALID_U32, crate::INVALID_U32)
|
||||
}
|
||||
}
|
||||
|
||||
impl IndexedData for Index {
|
||||
fn default() -> Self {
|
||||
Default::default()
|
||||
}
|
||||
|
||||
fn index(&self) -> usize {
|
||||
self.into_raw_parts().0 as usize
|
||||
|
||||
Reference in New Issue
Block a user