Remove unused deps

This commit is contained in:
Luke D. Jones
2024-05-06 13:25:07 +12:00
parent 667697d042
commit dc9ef8cf54
16 changed files with 57 additions and 138 deletions

80
Cargo.lock generated
View File

@@ -137,9 +137,9 @@ dependencies = [
"rog_platform",
"rog_profiles",
"rog_slash",
"ron",
"tinybmp",
"tokio",
"toml 0.5.11",
"zbus",
]
@@ -164,7 +164,6 @@ dependencies = [
"rog_slash",
"serde",
"serde_derive",
"systemd-zbus",
"tokio",
"udev 0.8.0",
"zbus",
@@ -178,14 +177,13 @@ dependencies = [
"config-traits",
"dirs",
"env_logger",
"log",
"rog_anime",
"rog_aura",
"rog_dbus",
"rog_platform",
"ron",
"serde",
"serde_derive",
"serde_json",
"smol",
"zbus",
]
@@ -501,7 +499,7 @@ dependencies = [
"bitflags 2.5.0",
"cexpr",
"clang-sys",
"itertools 0.12.1",
"itertools",
"lazy_static",
"lazycell",
"log",
@@ -853,9 +851,6 @@ dependencies = [
"log",
"ron",
"serde",
"serde_derive",
"serde_json",
"toml 0.5.11",
]
[[package]]
@@ -1441,7 +1436,7 @@ version = "0.3.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "38e2275cc4e4fc009b0669731a1e5ab7ebf11f469eaede2bab9309a5b4d6057f"
dependencies = [
"memoffset 0.9.1",
"memoffset",
"rustc_version",
]
@@ -1988,7 +1983,7 @@ dependencies = [
"fontdue",
"i-slint-common",
"image",
"itertools 0.12.1",
"itertools",
"linked_hash_set",
"lyon_extra",
"lyon_path",
@@ -2296,15 +2291,6 @@ dependencies = [
"windows-sys 0.52.0",
]
[[package]]
name = "itertools"
version = "0.10.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473"
dependencies = [
"either",
]
[[package]]
name = "itertools"
version = "0.12.1"
@@ -2653,15 +2639,6 @@ dependencies = [
"libc",
]
[[package]]
name = "memoffset"
version = "0.7.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5de893c32cde5f383baa4c04c5d6dbdd735cfd4a794b0debdb2bb1b421da5ff4"
dependencies = [
"autocfg",
]
[[package]]
name = "memoffset"
version = "0.9.1"
@@ -2779,8 +2756,6 @@ dependencies = [
"bitflags 1.3.2",
"cfg-if",
"libc",
"memoffset 0.7.1",
"pin-utils",
]
[[package]]
@@ -2804,7 +2779,7 @@ dependencies = [
"cfg-if",
"cfg_aliases 0.1.1",
"libc",
"memoffset 0.9.1",
"memoffset",
]
[[package]]
@@ -3412,18 +3387,15 @@ dependencies = [
"env_logger",
"gumdrop",
"log",
"nix 0.26.4",
"nix 0.28.0",
"notify-rust",
"png_pong",
"rog_anime",
"rog_aura",
"rog_dbus",
"rog_platform",
"rog_profiles",
"ron",
"serde",
"serde_derive",
"serde_json",
"slint",
"slint-build",
"supergfxctl",
@@ -3489,7 +3461,6 @@ dependencies = [
"rog_aura",
"rusb",
"serde",
"serde_derive",
"typeshare",
"udev 0.8.0",
"zbus",
@@ -3513,7 +3484,6 @@ dependencies = [
name = "rog_simulators"
version = "6.0.0"
dependencies = [
"glam",
"log",
"rog_anime",
"sdl2",
@@ -3526,11 +3496,6 @@ version = "6.0.0"
dependencies = [
"cargo-husky",
"dmi_id",
"gif 0.12.0",
"glam",
"log",
"pix",
"png_pong",
"serde",
"serde_derive",
"typeshare",
@@ -3557,7 +3522,7 @@ checksum = "32a58fa8a7ccff2aec4f39cc45bf5f985cec7125ab271cf681c279fd00192b49"
dependencies = [
"countme",
"hashbrown",
"memoffset 0.9.1",
"memoffset",
"rustc-hash",
"text-size",
]
@@ -3835,7 +3800,7 @@ dependencies = [
"regex",
"serde_json",
"tar",
"toml 0.8.12",
"toml",
]
[[package]]
@@ -4129,16 +4094,6 @@ dependencies = [
"unicode-ident",
]
[[package]]
name = "systemd-zbus"
version = "0.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a98ac0c9c7b08a92b01576551942fbfc80c64e7f2354e04b57264d9349fd2b2e"
dependencies = [
"serde",
"zbus",
]
[[package]]
name = "tar"
version = "0.4.40"
@@ -4320,15 +4275,6 @@ dependencies = [
"syn 2.0.60",
]
[[package]]
name = "toml"
version = "0.5.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f4f7f0dd8d50a853a531c426359045b1998f04219d88799810762cd4ad314234"
dependencies = [
"serde",
]
[[package]]
name = "toml"
version = "0.8.12"
@@ -4469,7 +4415,7 @@ version = "1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "89daebc3e6fd160ac4aa9fc8b3bf71e1f74fbf92367ae71fb83a037e8bf164b9"
dependencies = [
"memoffset 0.9.1",
"memoffset",
"tempfile",
"winapi",
]
@@ -4615,11 +4561,11 @@ checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f"
[[package]]
name = "versions"
version = "4.1.0"
version = "6.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ee97e1d97bd593fb513912a07691b742361b3dd64ad56f2c694ea2dbfe0665d3"
checksum = "38a8931f8d167b6448076020e70b9de46dcf5ea1731212481a092d0071c4ac5b"
dependencies = [
"itertools 0.10.5",
"itertools",
"nom",
]

View File

@@ -52,8 +52,6 @@ logind-zbus = { version = "~4.0.2" } #, default-features = false, features = ["n
serde = "^1.0"
serde_derive = "^1.0"
serde_json = "^1.0"
toml = "^0.5.10"
ron = "*"
typeshare = "1.0.0"
@@ -71,7 +69,7 @@ pix = "^0.13"
tinybmp = "^0.4.0"
gif = "^0.12.0"
versions = "4.1"
versions = "6.2"
notify-rust = { git = "https://github.com/flukejones/notify-rust.git", rev = "54176413b81189a3e4edbdc20a0b4f7e2e35c063", default-features = false, features = [
"z",
@@ -84,13 +82,15 @@ lto = "fat"
debug = false
opt-level = 3
panic = "abort"
#codegen-units = 1
codegen-units = 1
[profile.dev]
opt-level = 1
codegen-units = 16
[profile.dev.package."*"]
opt-level = 1
codegen-units = 16
[profile.bench]
debug = false

View File

@@ -18,10 +18,9 @@ rog_platform = { path = "../rog-platform" }
asusd = { path = "../asusd" }
dmi_id = { path = "../dmi-id" }
ron.workspace = true
gumdrop.workspace = true
toml.workspace = true
zbus.workspace = true
tokio.workspace = true
[dev-dependencies]
gif.workspace = true

View File

@@ -22,6 +22,7 @@ use rog_dbus::zbus_slash::SlashProxyBlocking;
use rog_platform::platform::{GpuMode, Properties, ThrottlePolicy};
use rog_profiles::error::ProfileError;
use rog_slash::SlashMode;
use ron::ser::PrettyConfig;
use zbus::blocking::Connection;
use crate::aura_cli::{AuraPowerStates, LedBrightness};
@@ -826,8 +827,8 @@ fn handle_fan_curve(
if let Some(profile) = cmd.mod_profile {
if cmd.enable_fan_curves.is_none() && cmd.data.is_none() {
let data = fan_proxy.fan_curve_data(profile)?;
let data = toml::to_string(&data)?;
println!("\nFan curves for {:?}\n\n{}", profile, data);
let ron = ron::ser::to_string_pretty(&data, PrettyConfig::new().depth_limit(4))?;
println!("\nFan curves for {:?}\n\n{}", profile, ron);
}
if let Some(enabled) = cmd.enable_fan_curves {

View File

@@ -18,8 +18,8 @@ smol.workspace = true
# serialisation
serde.workspace = true
serde_json.workspace = true
serde_derive.workspace = true
ron.workspace = true
rog_anime = { path = "../rog-anime" }
rog_aura = { path = "../rog-aura" }
@@ -28,10 +28,10 @@ rog_platform = { path = "../rog-platform" }
config-traits = { path = "../config-traits" }
zbus.workspace = true
# cli and logging
log.workspace = true
env_logger.workspace = true
[dev-dependencies]
cargo-husky.workspace = true
[package.metadata.cargo-machete]
ignored = ["serde"]

View File

@@ -8,6 +8,7 @@ use config_traits::StdConfig;
use rog_anime::error::AnimeError;
use rog_anime::{ActionData, ActionLoader, AnimTime, Fade, Sequences, Vec2};
use rog_dbus::zbus_anime::AnimeProxyBlocking;
use ron::ser::PrettyConfig;
use serde_derive::{Deserialize, Serialize};
use zbus::interface;
use zbus::zvariant::{ObjectPath, Type};
@@ -199,11 +200,12 @@ impl CtrlAnime<'static> {
config.anime.push(action);
config.write();
let json = serde_json::to_string_pretty(&*config).expect("Parse config to JSON failed");
let ron = ron::ser::to_string_pretty(&*config, PrettyConfig::new().depth_limit(4))
.expect("Parse config to RON failed");
// Release the inner run loop again
self.inner_early_return.store(false, Ordering::SeqCst);
return Ok(json);
return Ok(ron);
}
Err(zbus::fdo::Error::Failed("UserConfig lock fail".into()))
}
@@ -244,12 +246,11 @@ impl CtrlAnime<'static> {
config.anime.push(action);
config.write();
let json =
serde_json::to_string_pretty(&*config.anime).expect("Parse config to JSON failed");
let ron = ron::ser::to_string_pretty(&*config, PrettyConfig::new().depth_limit(4))
.expect("Parse config to RON failed");
// Release the inner run loop again
self.inner_early_return.store(false, Ordering::SeqCst);
return Ok(json);
return Ok(ron);
}
Err(zbus::fdo::Error::Failed("UserConfig lock fail".into()))
}
@@ -289,12 +290,11 @@ impl CtrlAnime<'static> {
config.anime.push(action);
config.write();
let json =
serde_json::to_string_pretty(&*config.anime).expect("Parse config to JSON failed");
let ron = ron::ser::to_string_pretty(&*config, PrettyConfig::new().depth_limit(4))
.expect("Parse config to RON failed");
// Release the inner run loop again
self.inner_early_return.store(false, Ordering::SeqCst);
return Ok(json);
return Ok(ron);
}
Err(zbus::fdo::Error::Failed("UserConfig lock fail".into()))
}
@@ -314,12 +314,11 @@ impl CtrlAnime<'static> {
config.anime.push(action);
config.write();
let json =
serde_json::to_string_pretty(&*config.anime).expect("Parse config to JSON failed");
let ron = ron::ser::to_string_pretty(&*config, PrettyConfig::new().depth_limit(4))
.expect("Parse config to RON failed");
// Release the inner run loop again
self.inner_early_return.store(false, Ordering::SeqCst);
return Ok(json);
return Ok(ron);
}
Err(zbus::fdo::Error::Failed("UserConfig lock fail".into()))
}
@@ -337,12 +336,11 @@ impl CtrlAnime<'static> {
}
config.write();
let json =
serde_json::to_string_pretty(&*config.anime).expect("Parse config to JSON failed");
let ron = ron::ser::to_string_pretty(&*config, PrettyConfig::new().depth_limit(4))
.expect("Parse config to RON failed");
// Release the inner run loop again
self.inner_early_return.store(false, Ordering::SeqCst);
return Ok(json);
return Ok(ron);
}
Err(zbus::fdo::Error::Failed("UserConfig lock fail".into()))
}

View File

@@ -42,7 +42,8 @@ serde_derive.workspace = true
concat-idents.workspace = true
systemd-zbus = "*"
[dev-dependencies]
cargo-husky.workspace = true
[package.metadata.cargo-machete]
ignored = ["serde"]

View File

@@ -10,9 +10,6 @@ edition.workspace = true
[dependencies]
serde.workspace = true
serde_derive.workspace = true
serde_json.workspace = true
toml.workspace = true
ron.workspace = true
log.workspace = true

View File

@@ -3,10 +3,7 @@
//! updating them from previous versions where fields or names are changed in
//! some way.
//!
//! The end canonical file format is `.ron` as this supports rust types well,
//! and includes the ability to add commenting, and is less verbose than `json`.
//! Currently the crate will also try to parse from `json` and `toml` if the
//! `ron` parsing fails, then update to `ron` format.
//! The end canonical file format is `.ron` as this supports rust types well
use std::fs::{self, create_dir, File, OpenOptions};
use std::io::{Read, Write};
@@ -221,21 +218,9 @@ macro_rules! std_config_load {
if let Ok(data) = ron::from_str(&buf) {
self = data;
log::info!("Parsed RON for {:?}", std::any::type_name::<Self>());
} else if let Ok(data) = serde_json::from_str(&buf) {
self = data;
log::info!("Parsed JSON for {:?}", std::any::type_name::<Self>());
} else if let Ok(data) = toml::from_str(&buf) {
self = data;
log::info!("Parsed TOML for {:?}", std::any::type_name::<Self>());
} $(else if let Ok(data) = ron::from_str::<$generic>(&buf) {
} $(else if let Ok(data) = ron::from_str::<$generic>(&buf) {
self = data.into();
log::info!("New version failed, trying previous: Parsed RON for {:?}", std::any::type_name::<$generic>());
} else if let Ok(data) = serde_json::from_str::<$generic>(&buf) {
self = data.into();
log::info!("New version failed, trying previous: Parsed JSON for {:?}", std::any::type_name::<$generic>());
} else if let Ok(data) = toml::from_str::<$generic>(&buf) {
self = data.into();
log::info!("Newvious version failed, trying previous: Parsed TOML for {:?}", std::any::type_name::<$generic>());
})* else {
self.rename_file_old();
self = Self::new();

View File

@@ -39,3 +39,6 @@ dmi_id = { path = "../dmi-id", optional = true }
[dev-dependencies]
cargo-husky.workspace = true
[package.metadata.cargo-machete]
ignored = ["serde"]

View File

@@ -29,4 +29,4 @@ typeshare.workspace = true
ron = { version = "*", optional = true }
[dev-dependencies]
cargo-husky.workspace = true
cargo-husky.workspace = true

View File

@@ -13,7 +13,7 @@ edition.workspace = true
#mocking = []
[dependencies]
nix = "^0.26.1"
nix = { version = "^0.28.0", features = ["fs"] }
tempfile = "3.3.0"
betrayer = { version = "0.2.0", features = ["winit"] }
@@ -33,15 +33,12 @@ env_logger.workspace = true
tokio.workspace = true
serde.workspace = true
ron.workspace = true
serde_json.workspace = true
serde_derive.workspace = true
zbus.workspace = true
dirs.workspace = true
notify-rust.workspace = true
concat-idents.workspace = true
png_pong.workspace = true
versions.workspace = true
[dependencies.slint]

View File

@@ -11,7 +11,6 @@ edition.workspace = true
[dependencies]
log.workspace = true
serde.workspace = true
serde_derive.workspace = true
zbus.workspace = true
concat-idents.workspace = true
udev.workspace = true

View File

@@ -24,3 +24,6 @@ zbus = { workspace = true, optional = true }
[dev-dependencies]
cargo-husky.workspace = true
[package.metadata.cargo-machete]
ignored = ["serde"]

View File

@@ -22,20 +22,14 @@ name = "rog_slash"
path = "src/lib.rs"
[dependencies]
png_pong.workspace = true
pix.workspace = true
gif.workspace = true
log.workspace = true
serde.workspace = true
serde_derive.workspace = true
glam.workspace = true
typeshare.workspace = true
zbus = { workspace = true, optional = true }
dmi_id = { path = "../dmi-id", optional = true }
[dev-dependencies]
cargo-husky.workspace = true
[package.metadata.cargo-machete]
ignored = ["serde"]

View File

@@ -15,11 +15,7 @@ path = "src/simulator.rs"
[dependencies]
log.workspace = true
glam.workspace = true
uhid-virt = "^0.0.7"
rog_anime = { path = "../rog-anime", features = ["dbus"] }
[dependencies.sdl2]