mirror of
https://codeberg.org/icewind/palantir.git
synced 2026-06-03 10:14:09 +02:00
fix memory
This commit is contained in:
parent
5f33dfa66b
commit
5afb89867d
1 changed files with 1 additions and 1 deletions
|
|
@ -96,7 +96,7 @@ pub fn memory() -> Result<Memory> {
|
||||||
if line.is_empty() {
|
if line.is_empty() {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if let Some(line) = line.strip_suffix(" kB") {
|
if let Some(line) = line.strip_suffix(" kB\n") {
|
||||||
if let Some(line_total) = line.strip_prefix("MemTotal: ") {
|
if let Some(line_total) = line.strip_prefix("MemTotal: ") {
|
||||||
mem.total = line_total.trim().parse()?;
|
mem.total = line_total.trim().parse()?;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue