From fa36d1d8dabbf065f84243b6f577d4b040393d0b Mon Sep 17 00:00:00 2001 From: ClementTsang Date: Tue, 5 Oct 2021 23:16:22 -0400 Subject: [PATCH] use correct unit when parsing memory and swap from Linux --- heim-memory/src/sys/linux/memory.rs | 2 +- heim-memory/src/sys/linux/swap.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/heim-memory/src/sys/linux/memory.rs b/heim-memory/src/sys/linux/memory.rs index 3a1a473f..58e4830a 100644 --- a/heim-memory/src/sys/linux/memory.rs +++ b/heim-memory/src/sys/linux/memory.rs @@ -79,7 +79,7 @@ impl FromStr for Memory { let bytes = match value.trim_start().splitn(2, ' ').next() { Some(kbytes) => { let value = kbytes.parse::()?; - Information::new::(value) + Information::new::(value) } None => continue, }; diff --git a/heim-memory/src/sys/linux/swap.rs b/heim-memory/src/sys/linux/swap.rs index ccffe516..6b08cb04 100644 --- a/heim-memory/src/sys/linux/swap.rs +++ b/heim-memory/src/sys/linux/swap.rs @@ -112,7 +112,7 @@ impl Swap { let bytes = match value.trim_start().splitn(2, ' ').next() { Some(kbytes) => { let value = kbytes.parse::()?; - Information::new::(value) + Information::new::(value) } None => continue, };