parser: fix metadata versioning

This commit is contained in:
k
2024-10-27 10:52:42 +01:00
parent f5754780a8
commit 95fc103eaf
5 changed files with 20 additions and 8 deletions

View File

@@ -32,7 +32,7 @@ pub struct Config {
#[arg(long, value_name = "SECONDS")]
pub delay: Option<u64>,
/// Maximum ram you want the program to use in GB, default: 75% of total, not saved
/// Maximum ram you want the program to use in GB, default: 50% of total, not saved
#[arg(long, value_name = "GB")]
pub max_ram: Option<f64>,

View File

@@ -74,9 +74,13 @@ impl Date {
}
}
pub fn is_new_year(&self) -> bool {
pub fn is_first_of_january(&self) -> bool {
self.day() == 1 && self.month() == 1
}
pub fn is_first_of_june(&self) -> bool {
self.day() == 1 && self.month() == 6
}
}
impl MapKey<DateMapChunkId> for Date {

View File

@@ -20,7 +20,7 @@ impl RAM {
(ram_used / 1_000_000_000.0) > max_ram
} else {
let ram_total = self.total_memory() as f64;
ram_used / ram_total > 0.75
ram_used / ram_total > 0.5
}
}
}