Fix after upgrading sysinfo

This commit is contained in:
Clément Renault 2025-01-08 15:59:30 +01:00
parent 5e8144b0e1
commit d4529d8c83
No known key found for this signature in database
GPG key ID: F250A4C4E3AE5F5F
2 changed files with 4 additions and 7 deletions

View file

@ -760,8 +760,8 @@ impl MaxMemory {
/// Returns the total amount of bytes available or `None` if this system isn't supported.
fn total_memory_bytes() -> Option<u64> {
if sysinfo::IS_SUPPORTED_SYSTEM {
let memory_kind = RefreshKind::new().with_memory(MemoryRefreshKind::new().with_ram());
let mut system = System::new_with_specifics(memory_kind);
let mem_kind = RefreshKind::nothing().with_memory(MemoryRefreshKind::nothing().with_ram());
let mut system = System::new_with_specifics(mem_kind);
system.refresh_memory();
Some(system.total_memory())
} else {