implement default trait

This commit is contained in:
yggverse 2025-10-19 22:37:48 +03:00
parent f8537e4ab6
commit 7e9ecf64b3
2 changed files with 20 additions and 0 deletions

View file

@ -5,3 +5,13 @@ pub struct Size {
pub limit: Option<usize>, pub limit: Option<usize>,
pub total: usize, pub total: usize,
} }
impl Default for Size {
fn default() -> Self {
Self {
chunk: 0x10000, // 64KB
limit: None,
total: 0,
}
}
}

View file

@ -4,3 +4,13 @@ pub struct Size {
pub limit: usize, pub limit: usize,
pub total: usize, pub total: usize,
} }
impl Default for Size {
fn default() -> Self {
Self {
chunk: 0x10000, // 64KB
limit: 0xfffff, // 1 MB
total: 0,
}
}
}