Fix load tile

This commit is contained in:
Artemis Tosini 2020-05-31 21:16:51 +00:00
parent f0e71ab4e1
commit 03379014b7
Signed by: artemist
GPG key ID: EE5227935FE3FF18

View file

@ -30,9 +30,9 @@ impl Load {
async fn run(&self) -> Result<(), Box<dyn std::error::Error + Send + Sync>> { async fn run(&self) -> Result<(), Box<dyn std::error::Error + Send + Sync>> {
let mut timer = interval(Duration::from_secs(5)); let mut timer = interval(Duration::from_secs(5));
let mut raw = String::new();
loop { loop {
timer.tick().await; timer.tick().await;
let mut raw = String::new();
File::open("/proc/loadavg") File::open("/proc/loadavg")
.await? .await?
.read_to_string(&mut raw) .read_to_string(&mut raw)