mirror of
https://github.com/YGGverse/ggemini.git
synced 2026-03-31 09:05:45 +00:00
implement default trait
This commit is contained in:
parent
f8537e4ab6
commit
7e9ecf64b3
2 changed files with 20 additions and 0 deletions
|
|
@ -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,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -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,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue