Skip to content

Commit

Permalink
fix(all): lints
Browse files Browse the repository at this point in the history
  • Loading branch information
SpikeHD committed Sep 26, 2023
1 parent 81b23f7 commit 16c585d
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
7 changes: 5 additions & 2 deletions backend/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ use std::{io::Write, path::Path};
use tide::utils::async_trait;
use tide_http_auth::{BasicAuthRequest, Storage};

mod web;
mod resource_watcher;
mod util;
mod web;

static FRONTEND_DIR: Dir = include_dir!("../frontend/dist");

Expand Down Expand Up @@ -141,7 +141,10 @@ fn main() {
println!("Retaining {} of memory history", args.mem_history_max);
println!("Retaining {} of CPU history", args.cpu_history_max);
println!("Updating every {} seconds", args.update_rate);
println!("Done! Access the web interface at http://localhost:{}/", args.port);
println!(
"Done! Access the web interface at http://localhost:{}/",
args.port
);

task::block_on(async {
app
Expand Down
7 changes: 5 additions & 2 deletions backend/src/resource_watcher.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
use serde::Serialize;
use std::{sync::{Arc, Mutex}, collections::HashMap};
use std::{
collections::HashMap,
sync::{Arc, Mutex},
};
use sysinfo::{CpuExt, DiskExt, NetworkExt, PidExt, ProcessExt, System, SystemExt};

use crate::web::api::ApiSettings;
Expand Down Expand Up @@ -145,7 +148,7 @@ impl ResourceWatcher {

// For each disk name, add it's current usage to it's list in the hashmap
for disk in system.disks() {
let name = format!("{:?}", disk.name()).replace("\"", "");
let name = format!("{:?}", disk.name()).replace('\"', "");

if !disks.contains_key(&name) {
disks.insert(name.clone(), Vec::new());
Expand Down
2 changes: 1 addition & 1 deletion backend/src/web/mod.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
pub mod api;
pub mod middleware;
pub mod request_data;
pub mod request_data;

0 comments on commit 16c585d

Please sign in to comment.