cargo upgrade/update and better imports

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

45
Cargo.lock generated
View File

@ -75,15 +75,21 @@ checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b"
[[package]]
name = "lazy_static"
version = "1.4.0"
version = "1.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646"
checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe"
[[package]]
name = "libc"
version = "0.2.155"
version = "0.2.158"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "97b3888a4aecf77e811145cadf6eef5901f4782c53886191b2f693f24761847c"
checksum = "d8adc4bb1803a324070e64a98ae98f38934d91957a99cfb3a43dcbc01bc56439"
[[package]]
name = "memchr"
version = "2.7.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3"
[[package]]
name = "mtemp"
@ -121,9 +127,9 @@ dependencies = [
[[package]]
name = "proc-macro2"
version = "1.0.84"
version = "1.0.86"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ec96c6a92621310b51366f1e28d05ef11489516e93be030060e5fc12024a49d6"
checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77"
dependencies = [
"unicode-ident",
]
@ -145,31 +151,32 @@ checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f"
[[package]]
name = "serde"
version = "1.0.203"
version = "1.0.208"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7253ab4de971e72fb7be983802300c30b5a7f0c2e56fab8abfc6a214307c0094"
checksum = "cff085d2cb684faa248efb494c39b68e522822ac0de72ccf08109abde717cfb2"
dependencies = [
"serde_derive",
]
[[package]]
name = "serde_derive"
version = "1.0.203"
version = "1.0.208"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "500cbc0ebeb6f46627f50f3f5811ccf6bf00643be300b4c3eabc0ef55dc5b5ba"
checksum = "24008e81ff7613ed8e5ba0cfaf24e2c2f1e5b8a0495711e44fcd4882fca62bcf"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.66",
"syn 2.0.75",
]
[[package]]
name = "serde_json"
version = "1.0.117"
version = "1.0.125"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "455182ea6142b14f93f4bc5320a2b31c1f266b66a4a5c858b013302a5d8cbfc3"
checksum = "83c8e735a073ccf5be70aa8066aa984eaf2fa000db6c8d0100ae605b366d31ed"
dependencies = [
"itoa",
"memchr",
"ryu",
"serde",
]
@ -217,9 +224,9 @@ dependencies = [
[[package]]
name = "syn"
version = "2.0.66"
version = "2.0.75"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c42f3f41a2de00b01c0aaad383c5a45241efc8b2d1eda5661812fda5f3cdcff5"
checksum = "f6af063034fc1935ede7be0122941bafa9bacb949334d090b77ca98b5817c7d9"
dependencies = [
"proc-macro2",
"quote",
@ -249,9 +256,9 @@ checksum = "d4c87d22b6e3f4a18d4d40ef354e97c90fcb14dd91d7dc0aa9d8a1172ebf7202"
[[package]]
name = "unicode-width"
version = "0.1.12"
version = "0.1.13"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "68f5e5f3158ecfd4b8ff6fe086db7c8467a2dfdac97fe420f2b7c4aa97af66d6"
checksum = "0336d538f7abc86d282a4189614dfaa90810dfc2c6f6427eaf88e16311dd225d"
[[package]]
name = "vec_map"
@ -261,9 +268,9 @@ checksum = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191"
[[package]]
name = "version_check"
version = "0.9.4"
version = "0.9.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f"
checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a"
[[package]]
name = "winapi"

View File

@ -19,7 +19,7 @@ name = "mtemp"
path = "src/main.rs"
[dependencies]
anyhow = "1.0.79"
serde = {version = "1.0.196", features = ["derive"]}
serde_json = "1.0.113"
anyhow = "1.0.86"
serde = {version = "1.0.208", features = ["derive"]}
serde_json = "1.0.125"
structopt = "0.3.26"

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"];