cargo upgrade/update and better imports

This commit is contained in:
2024-08-21 04:07:14 +02:00
parent 3af42cfa38
commit bcab3b7189
5 changed files with 34 additions and 34 deletions

View File

@ -1,12 +1,8 @@
use crate::sensor_names::CPU_NAMES;
use crate::sensor_names::DISK_NAMES;
use crate::sensor_names::TEMP_NAMES;
use anyhow::anyhow;
use anyhow::Result;
use crate::sensor_names::{CPU_NAMES, DISK_NAMES, TEMP_NAMES};
use anyhow::{anyhow, Result};
use core::f64;
use serde::Deserialize;
use std::collections::BTreeMap;
use std::process::Command;
use std::{collections::BTreeMap, process::Command};
#[derive(Debug)]
pub struct SensorData {

View File

@ -1,7 +1,5 @@
use anyhow::anyhow;
use anyhow::Result;
use std::process::Command;
use std::result::Result::Ok;
use anyhow::{anyhow, Result};
use std::{process::Command, result::Result::Ok};
pub fn temperature() -> Result<f64> {
let output = Command::new("nvidia-smi")

View File

@ -1,4 +1,3 @@
pub const TEMP_NAMES: [&str; 1] = ["temp1_input"];
pub const CPU_NAMES: [&str; 1] = ["k10temp-pci-00c3"];
pub const DISK_NAMES: [&str; 1] = ["nvme-pci-0100"];