mirror of
https://gitlab.com/asus-linux/asusctl.git
synced 2026-02-06 00:15:04 +01:00
Remove unused deps
This commit is contained in:
80
Cargo.lock
generated
80
Cargo.lock
generated
@@ -137,9 +137,9 @@ dependencies = [
|
|||||||
"rog_platform",
|
"rog_platform",
|
||||||
"rog_profiles",
|
"rog_profiles",
|
||||||
"rog_slash",
|
"rog_slash",
|
||||||
|
"ron",
|
||||||
"tinybmp",
|
"tinybmp",
|
||||||
"tokio",
|
"tokio",
|
||||||
"toml 0.5.11",
|
|
||||||
"zbus",
|
"zbus",
|
||||||
]
|
]
|
||||||
|
|
||||||
@@ -164,7 +164,6 @@ dependencies = [
|
|||||||
"rog_slash",
|
"rog_slash",
|
||||||
"serde",
|
"serde",
|
||||||
"serde_derive",
|
"serde_derive",
|
||||||
"systemd-zbus",
|
|
||||||
"tokio",
|
"tokio",
|
||||||
"udev 0.8.0",
|
"udev 0.8.0",
|
||||||
"zbus",
|
"zbus",
|
||||||
@@ -178,14 +177,13 @@ dependencies = [
|
|||||||
"config-traits",
|
"config-traits",
|
||||||
"dirs",
|
"dirs",
|
||||||
"env_logger",
|
"env_logger",
|
||||||
"log",
|
|
||||||
"rog_anime",
|
"rog_anime",
|
||||||
"rog_aura",
|
"rog_aura",
|
||||||
"rog_dbus",
|
"rog_dbus",
|
||||||
"rog_platform",
|
"rog_platform",
|
||||||
|
"ron",
|
||||||
"serde",
|
"serde",
|
||||||
"serde_derive",
|
"serde_derive",
|
||||||
"serde_json",
|
|
||||||
"smol",
|
"smol",
|
||||||
"zbus",
|
"zbus",
|
||||||
]
|
]
|
||||||
@@ -501,7 +499,7 @@ dependencies = [
|
|||||||
"bitflags 2.5.0",
|
"bitflags 2.5.0",
|
||||||
"cexpr",
|
"cexpr",
|
||||||
"clang-sys",
|
"clang-sys",
|
||||||
"itertools 0.12.1",
|
"itertools",
|
||||||
"lazy_static",
|
"lazy_static",
|
||||||
"lazycell",
|
"lazycell",
|
||||||
"log",
|
"log",
|
||||||
@@ -853,9 +851,6 @@ dependencies = [
|
|||||||
"log",
|
"log",
|
||||||
"ron",
|
"ron",
|
||||||
"serde",
|
"serde",
|
||||||
"serde_derive",
|
|
||||||
"serde_json",
|
|
||||||
"toml 0.5.11",
|
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@@ -1441,7 +1436,7 @@ version = "0.3.6"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "38e2275cc4e4fc009b0669731a1e5ab7ebf11f469eaede2bab9309a5b4d6057f"
|
checksum = "38e2275cc4e4fc009b0669731a1e5ab7ebf11f469eaede2bab9309a5b4d6057f"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"memoffset 0.9.1",
|
"memoffset",
|
||||||
"rustc_version",
|
"rustc_version",
|
||||||
]
|
]
|
||||||
|
|
||||||
@@ -1988,7 +1983,7 @@ dependencies = [
|
|||||||
"fontdue",
|
"fontdue",
|
||||||
"i-slint-common",
|
"i-slint-common",
|
||||||
"image",
|
"image",
|
||||||
"itertools 0.12.1",
|
"itertools",
|
||||||
"linked_hash_set",
|
"linked_hash_set",
|
||||||
"lyon_extra",
|
"lyon_extra",
|
||||||
"lyon_path",
|
"lyon_path",
|
||||||
@@ -2296,15 +2291,6 @@ dependencies = [
|
|||||||
"windows-sys 0.52.0",
|
"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]]
|
[[package]]
|
||||||
name = "itertools"
|
name = "itertools"
|
||||||
version = "0.12.1"
|
version = "0.12.1"
|
||||||
@@ -2653,15 +2639,6 @@ dependencies = [
|
|||||||
"libc",
|
"libc",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "memoffset"
|
|
||||||
version = "0.7.1"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "5de893c32cde5f383baa4c04c5d6dbdd735cfd4a794b0debdb2bb1b421da5ff4"
|
|
||||||
dependencies = [
|
|
||||||
"autocfg",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "memoffset"
|
name = "memoffset"
|
||||||
version = "0.9.1"
|
version = "0.9.1"
|
||||||
@@ -2779,8 +2756,6 @@ dependencies = [
|
|||||||
"bitflags 1.3.2",
|
"bitflags 1.3.2",
|
||||||
"cfg-if",
|
"cfg-if",
|
||||||
"libc",
|
"libc",
|
||||||
"memoffset 0.7.1",
|
|
||||||
"pin-utils",
|
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@@ -2804,7 +2779,7 @@ dependencies = [
|
|||||||
"cfg-if",
|
"cfg-if",
|
||||||
"cfg_aliases 0.1.1",
|
"cfg_aliases 0.1.1",
|
||||||
"libc",
|
"libc",
|
||||||
"memoffset 0.9.1",
|
"memoffset",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@@ -3412,18 +3387,15 @@ dependencies = [
|
|||||||
"env_logger",
|
"env_logger",
|
||||||
"gumdrop",
|
"gumdrop",
|
||||||
"log",
|
"log",
|
||||||
"nix 0.26.4",
|
"nix 0.28.0",
|
||||||
"notify-rust",
|
"notify-rust",
|
||||||
"png_pong",
|
|
||||||
"rog_anime",
|
"rog_anime",
|
||||||
"rog_aura",
|
"rog_aura",
|
||||||
"rog_dbus",
|
"rog_dbus",
|
||||||
"rog_platform",
|
"rog_platform",
|
||||||
"rog_profiles",
|
"rog_profiles",
|
||||||
"ron",
|
|
||||||
"serde",
|
"serde",
|
||||||
"serde_derive",
|
"serde_derive",
|
||||||
"serde_json",
|
|
||||||
"slint",
|
"slint",
|
||||||
"slint-build",
|
"slint-build",
|
||||||
"supergfxctl",
|
"supergfxctl",
|
||||||
@@ -3489,7 +3461,6 @@ dependencies = [
|
|||||||
"rog_aura",
|
"rog_aura",
|
||||||
"rusb",
|
"rusb",
|
||||||
"serde",
|
"serde",
|
||||||
"serde_derive",
|
|
||||||
"typeshare",
|
"typeshare",
|
||||||
"udev 0.8.0",
|
"udev 0.8.0",
|
||||||
"zbus",
|
"zbus",
|
||||||
@@ -3513,7 +3484,6 @@ dependencies = [
|
|||||||
name = "rog_simulators"
|
name = "rog_simulators"
|
||||||
version = "6.0.0"
|
version = "6.0.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"glam",
|
|
||||||
"log",
|
"log",
|
||||||
"rog_anime",
|
"rog_anime",
|
||||||
"sdl2",
|
"sdl2",
|
||||||
@@ -3526,11 +3496,6 @@ version = "6.0.0"
|
|||||||
dependencies = [
|
dependencies = [
|
||||||
"cargo-husky",
|
"cargo-husky",
|
||||||
"dmi_id",
|
"dmi_id",
|
||||||
"gif 0.12.0",
|
|
||||||
"glam",
|
|
||||||
"log",
|
|
||||||
"pix",
|
|
||||||
"png_pong",
|
|
||||||
"serde",
|
"serde",
|
||||||
"serde_derive",
|
"serde_derive",
|
||||||
"typeshare",
|
"typeshare",
|
||||||
@@ -3557,7 +3522,7 @@ checksum = "32a58fa8a7ccff2aec4f39cc45bf5f985cec7125ab271cf681c279fd00192b49"
|
|||||||
dependencies = [
|
dependencies = [
|
||||||
"countme",
|
"countme",
|
||||||
"hashbrown",
|
"hashbrown",
|
||||||
"memoffset 0.9.1",
|
"memoffset",
|
||||||
"rustc-hash",
|
"rustc-hash",
|
||||||
"text-size",
|
"text-size",
|
||||||
]
|
]
|
||||||
@@ -3835,7 +3800,7 @@ dependencies = [
|
|||||||
"regex",
|
"regex",
|
||||||
"serde_json",
|
"serde_json",
|
||||||
"tar",
|
"tar",
|
||||||
"toml 0.8.12",
|
"toml",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@@ -4129,16 +4094,6 @@ dependencies = [
|
|||||||
"unicode-ident",
|
"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]]
|
[[package]]
|
||||||
name = "tar"
|
name = "tar"
|
||||||
version = "0.4.40"
|
version = "0.4.40"
|
||||||
@@ -4320,15 +4275,6 @@ dependencies = [
|
|||||||
"syn 2.0.60",
|
"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]]
|
[[package]]
|
||||||
name = "toml"
|
name = "toml"
|
||||||
version = "0.8.12"
|
version = "0.8.12"
|
||||||
@@ -4469,7 +4415,7 @@ version = "1.1.0"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "89daebc3e6fd160ac4aa9fc8b3bf71e1f74fbf92367ae71fb83a037e8bf164b9"
|
checksum = "89daebc3e6fd160ac4aa9fc8b3bf71e1f74fbf92367ae71fb83a037e8bf164b9"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"memoffset 0.9.1",
|
"memoffset",
|
||||||
"tempfile",
|
"tempfile",
|
||||||
"winapi",
|
"winapi",
|
||||||
]
|
]
|
||||||
@@ -4615,11 +4561,11 @@ checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "versions"
|
name = "versions"
|
||||||
version = "4.1.0"
|
version = "6.2.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "ee97e1d97bd593fb513912a07691b742361b3dd64ad56f2c694ea2dbfe0665d3"
|
checksum = "38a8931f8d167b6448076020e70b9de46dcf5ea1731212481a092d0071c4ac5b"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"itertools 0.10.5",
|
"itertools",
|
||||||
"nom",
|
"nom",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|||||||
@@ -52,8 +52,6 @@ logind-zbus = { version = "~4.0.2" } #, default-features = false, features = ["n
|
|||||||
|
|
||||||
serde = "^1.0"
|
serde = "^1.0"
|
||||||
serde_derive = "^1.0"
|
serde_derive = "^1.0"
|
||||||
serde_json = "^1.0"
|
|
||||||
toml = "^0.5.10"
|
|
||||||
ron = "*"
|
ron = "*"
|
||||||
typeshare = "1.0.0"
|
typeshare = "1.0.0"
|
||||||
|
|
||||||
@@ -71,7 +69,7 @@ pix = "^0.13"
|
|||||||
tinybmp = "^0.4.0"
|
tinybmp = "^0.4.0"
|
||||||
gif = "^0.12.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 = [
|
notify-rust = { git = "https://github.com/flukejones/notify-rust.git", rev = "54176413b81189a3e4edbdc20a0b4f7e2e35c063", default-features = false, features = [
|
||||||
"z",
|
"z",
|
||||||
@@ -84,13 +82,15 @@ lto = "fat"
|
|||||||
debug = false
|
debug = false
|
||||||
opt-level = 3
|
opt-level = 3
|
||||||
panic = "abort"
|
panic = "abort"
|
||||||
#codegen-units = 1
|
codegen-units = 1
|
||||||
|
|
||||||
[profile.dev]
|
[profile.dev]
|
||||||
opt-level = 1
|
opt-level = 1
|
||||||
|
codegen-units = 16
|
||||||
|
|
||||||
[profile.dev.package."*"]
|
[profile.dev.package."*"]
|
||||||
opt-level = 1
|
opt-level = 1
|
||||||
|
codegen-units = 16
|
||||||
|
|
||||||
[profile.bench]
|
[profile.bench]
|
||||||
debug = false
|
debug = false
|
||||||
|
|||||||
@@ -18,10 +18,9 @@ rog_platform = { path = "../rog-platform" }
|
|||||||
asusd = { path = "../asusd" }
|
asusd = { path = "../asusd" }
|
||||||
dmi_id = { path = "../dmi-id" }
|
dmi_id = { path = "../dmi-id" }
|
||||||
|
|
||||||
|
ron.workspace = true
|
||||||
gumdrop.workspace = true
|
gumdrop.workspace = true
|
||||||
toml.workspace = true
|
|
||||||
zbus.workspace = true
|
zbus.workspace = true
|
||||||
tokio.workspace = true
|
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
gif.workspace = true
|
gif.workspace = true
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ use rog_dbus::zbus_slash::SlashProxyBlocking;
|
|||||||
use rog_platform::platform::{GpuMode, Properties, ThrottlePolicy};
|
use rog_platform::platform::{GpuMode, Properties, ThrottlePolicy};
|
||||||
use rog_profiles::error::ProfileError;
|
use rog_profiles::error::ProfileError;
|
||||||
use rog_slash::SlashMode;
|
use rog_slash::SlashMode;
|
||||||
|
use ron::ser::PrettyConfig;
|
||||||
use zbus::blocking::Connection;
|
use zbus::blocking::Connection;
|
||||||
|
|
||||||
use crate::aura_cli::{AuraPowerStates, LedBrightness};
|
use crate::aura_cli::{AuraPowerStates, LedBrightness};
|
||||||
@@ -826,8 +827,8 @@ fn handle_fan_curve(
|
|||||||
if let Some(profile) = cmd.mod_profile {
|
if let Some(profile) = cmd.mod_profile {
|
||||||
if cmd.enable_fan_curves.is_none() && cmd.data.is_none() {
|
if cmd.enable_fan_curves.is_none() && cmd.data.is_none() {
|
||||||
let data = fan_proxy.fan_curve_data(profile)?;
|
let data = fan_proxy.fan_curve_data(profile)?;
|
||||||
let data = toml::to_string(&data)?;
|
let ron = ron::ser::to_string_pretty(&data, PrettyConfig::new().depth_limit(4))?;
|
||||||
println!("\nFan curves for {:?}\n\n{}", profile, data);
|
println!("\nFan curves for {:?}\n\n{}", profile, ron);
|
||||||
}
|
}
|
||||||
|
|
||||||
if let Some(enabled) = cmd.enable_fan_curves {
|
if let Some(enabled) = cmd.enable_fan_curves {
|
||||||
|
|||||||
@@ -18,8 +18,8 @@ smol.workspace = true
|
|||||||
|
|
||||||
# serialisation
|
# serialisation
|
||||||
serde.workspace = true
|
serde.workspace = true
|
||||||
serde_json.workspace = true
|
|
||||||
serde_derive.workspace = true
|
serde_derive.workspace = true
|
||||||
|
ron.workspace = true
|
||||||
|
|
||||||
rog_anime = { path = "../rog-anime" }
|
rog_anime = { path = "../rog-anime" }
|
||||||
rog_aura = { path = "../rog-aura" }
|
rog_aura = { path = "../rog-aura" }
|
||||||
@@ -28,10 +28,10 @@ rog_platform = { path = "../rog-platform" }
|
|||||||
config-traits = { path = "../config-traits" }
|
config-traits = { path = "../config-traits" }
|
||||||
|
|
||||||
zbus.workspace = true
|
zbus.workspace = true
|
||||||
|
|
||||||
# cli and logging
|
|
||||||
log.workspace = true
|
|
||||||
env_logger.workspace = true
|
env_logger.workspace = true
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
cargo-husky.workspace = true
|
cargo-husky.workspace = true
|
||||||
|
|
||||||
|
[package.metadata.cargo-machete]
|
||||||
|
ignored = ["serde"]
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ use config_traits::StdConfig;
|
|||||||
use rog_anime::error::AnimeError;
|
use rog_anime::error::AnimeError;
|
||||||
use rog_anime::{ActionData, ActionLoader, AnimTime, Fade, Sequences, Vec2};
|
use rog_anime::{ActionData, ActionLoader, AnimTime, Fade, Sequences, Vec2};
|
||||||
use rog_dbus::zbus_anime::AnimeProxyBlocking;
|
use rog_dbus::zbus_anime::AnimeProxyBlocking;
|
||||||
|
use ron::ser::PrettyConfig;
|
||||||
use serde_derive::{Deserialize, Serialize};
|
use serde_derive::{Deserialize, Serialize};
|
||||||
use zbus::interface;
|
use zbus::interface;
|
||||||
use zbus::zvariant::{ObjectPath, Type};
|
use zbus::zvariant::{ObjectPath, Type};
|
||||||
@@ -199,11 +200,12 @@ impl CtrlAnime<'static> {
|
|||||||
config.anime.push(action);
|
config.anime.push(action);
|
||||||
config.write();
|
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
|
// Release the inner run loop again
|
||||||
self.inner_early_return.store(false, Ordering::SeqCst);
|
self.inner_early_return.store(false, Ordering::SeqCst);
|
||||||
return Ok(json);
|
return Ok(ron);
|
||||||
}
|
}
|
||||||
Err(zbus::fdo::Error::Failed("UserConfig lock fail".into()))
|
Err(zbus::fdo::Error::Failed("UserConfig lock fail".into()))
|
||||||
}
|
}
|
||||||
@@ -244,12 +246,11 @@ impl CtrlAnime<'static> {
|
|||||||
config.anime.push(action);
|
config.anime.push(action);
|
||||||
config.write();
|
config.write();
|
||||||
|
|
||||||
let json =
|
let ron = ron::ser::to_string_pretty(&*config, PrettyConfig::new().depth_limit(4))
|
||||||
serde_json::to_string_pretty(&*config.anime).expect("Parse config to JSON failed");
|
.expect("Parse config to RON failed");
|
||||||
|
|
||||||
// Release the inner run loop again
|
// Release the inner run loop again
|
||||||
self.inner_early_return.store(false, Ordering::SeqCst);
|
self.inner_early_return.store(false, Ordering::SeqCst);
|
||||||
return Ok(json);
|
return Ok(ron);
|
||||||
}
|
}
|
||||||
Err(zbus::fdo::Error::Failed("UserConfig lock fail".into()))
|
Err(zbus::fdo::Error::Failed("UserConfig lock fail".into()))
|
||||||
}
|
}
|
||||||
@@ -289,12 +290,11 @@ impl CtrlAnime<'static> {
|
|||||||
config.anime.push(action);
|
config.anime.push(action);
|
||||||
config.write();
|
config.write();
|
||||||
|
|
||||||
let json =
|
let ron = ron::ser::to_string_pretty(&*config, PrettyConfig::new().depth_limit(4))
|
||||||
serde_json::to_string_pretty(&*config.anime).expect("Parse config to JSON failed");
|
.expect("Parse config to RON failed");
|
||||||
|
|
||||||
// Release the inner run loop again
|
// Release the inner run loop again
|
||||||
self.inner_early_return.store(false, Ordering::SeqCst);
|
self.inner_early_return.store(false, Ordering::SeqCst);
|
||||||
return Ok(json);
|
return Ok(ron);
|
||||||
}
|
}
|
||||||
Err(zbus::fdo::Error::Failed("UserConfig lock fail".into()))
|
Err(zbus::fdo::Error::Failed("UserConfig lock fail".into()))
|
||||||
}
|
}
|
||||||
@@ -314,12 +314,11 @@ impl CtrlAnime<'static> {
|
|||||||
config.anime.push(action);
|
config.anime.push(action);
|
||||||
config.write();
|
config.write();
|
||||||
|
|
||||||
let json =
|
let ron = ron::ser::to_string_pretty(&*config, PrettyConfig::new().depth_limit(4))
|
||||||
serde_json::to_string_pretty(&*config.anime).expect("Parse config to JSON failed");
|
.expect("Parse config to RON failed");
|
||||||
|
|
||||||
// Release the inner run loop again
|
// Release the inner run loop again
|
||||||
self.inner_early_return.store(false, Ordering::SeqCst);
|
self.inner_early_return.store(false, Ordering::SeqCst);
|
||||||
return Ok(json);
|
return Ok(ron);
|
||||||
}
|
}
|
||||||
Err(zbus::fdo::Error::Failed("UserConfig lock fail".into()))
|
Err(zbus::fdo::Error::Failed("UserConfig lock fail".into()))
|
||||||
}
|
}
|
||||||
@@ -337,12 +336,11 @@ impl CtrlAnime<'static> {
|
|||||||
}
|
}
|
||||||
config.write();
|
config.write();
|
||||||
|
|
||||||
let json =
|
let ron = ron::ser::to_string_pretty(&*config, PrettyConfig::new().depth_limit(4))
|
||||||
serde_json::to_string_pretty(&*config.anime).expect("Parse config to JSON failed");
|
.expect("Parse config to RON failed");
|
||||||
|
|
||||||
// Release the inner run loop again
|
// Release the inner run loop again
|
||||||
self.inner_early_return.store(false, Ordering::SeqCst);
|
self.inner_early_return.store(false, Ordering::SeqCst);
|
||||||
return Ok(json);
|
return Ok(ron);
|
||||||
}
|
}
|
||||||
Err(zbus::fdo::Error::Failed("UserConfig lock fail".into()))
|
Err(zbus::fdo::Error::Failed("UserConfig lock fail".into()))
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -42,7 +42,8 @@ serde_derive.workspace = true
|
|||||||
|
|
||||||
concat-idents.workspace = true
|
concat-idents.workspace = true
|
||||||
|
|
||||||
systemd-zbus = "*"
|
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
cargo-husky.workspace = true
|
cargo-husky.workspace = true
|
||||||
|
|
||||||
|
[package.metadata.cargo-machete]
|
||||||
|
ignored = ["serde"]
|
||||||
|
|||||||
@@ -10,9 +10,6 @@ edition.workspace = true
|
|||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
serde.workspace = true
|
serde.workspace = true
|
||||||
serde_derive.workspace = true
|
|
||||||
serde_json.workspace = true
|
|
||||||
toml.workspace = true
|
|
||||||
ron.workspace = true
|
ron.workspace = true
|
||||||
|
|
||||||
log.workspace = true
|
log.workspace = true
|
||||||
|
|||||||
@@ -3,10 +3,7 @@
|
|||||||
//! updating them from previous versions where fields or names are changed in
|
//! updating them from previous versions where fields or names are changed in
|
||||||
//! some way.
|
//! some way.
|
||||||
//!
|
//!
|
||||||
//! The end canonical file format is `.ron` as this supports rust types well,
|
//! 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.
|
|
||||||
|
|
||||||
use std::fs::{self, create_dir, File, OpenOptions};
|
use std::fs::{self, create_dir, File, OpenOptions};
|
||||||
use std::io::{Read, Write};
|
use std::io::{Read, Write};
|
||||||
@@ -221,21 +218,9 @@ macro_rules! std_config_load {
|
|||||||
if let Ok(data) = ron::from_str(&buf) {
|
if let Ok(data) = ron::from_str(&buf) {
|
||||||
self = data;
|
self = data;
|
||||||
log::info!("Parsed RON for {:?}", std::any::type_name::<Self>());
|
log::info!("Parsed RON for {:?}", std::any::type_name::<Self>());
|
||||||
} else if let Ok(data) = serde_json::from_str(&buf) {
|
} $(else if let Ok(data) = ron::from_str::<$generic>(&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) {
|
|
||||||
self = data.into();
|
self = data.into();
|
||||||
log::info!("New version failed, trying previous: Parsed RON for {:?}", std::any::type_name::<$generic>());
|
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 {
|
})* else {
|
||||||
self.rename_file_old();
|
self.rename_file_old();
|
||||||
self = Self::new();
|
self = Self::new();
|
||||||
|
|||||||
@@ -39,3 +39,6 @@ dmi_id = { path = "../dmi-id", optional = true }
|
|||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
cargo-husky.workspace = true
|
cargo-husky.workspace = true
|
||||||
|
|
||||||
|
[package.metadata.cargo-machete]
|
||||||
|
ignored = ["serde"]
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ edition.workspace = true
|
|||||||
#mocking = []
|
#mocking = []
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
nix = "^0.26.1"
|
nix = { version = "^0.28.0", features = ["fs"] }
|
||||||
tempfile = "3.3.0"
|
tempfile = "3.3.0"
|
||||||
betrayer = { version = "0.2.0", features = ["winit"] }
|
betrayer = { version = "0.2.0", features = ["winit"] }
|
||||||
|
|
||||||
@@ -33,15 +33,12 @@ env_logger.workspace = true
|
|||||||
|
|
||||||
tokio.workspace = true
|
tokio.workspace = true
|
||||||
serde.workspace = true
|
serde.workspace = true
|
||||||
ron.workspace = true
|
|
||||||
serde_json.workspace = true
|
|
||||||
serde_derive.workspace = true
|
serde_derive.workspace = true
|
||||||
zbus.workspace = true
|
zbus.workspace = true
|
||||||
dirs.workspace = true
|
dirs.workspace = true
|
||||||
notify-rust.workspace = true
|
notify-rust.workspace = true
|
||||||
concat-idents.workspace = true
|
concat-idents.workspace = true
|
||||||
|
|
||||||
png_pong.workspace = true
|
|
||||||
versions.workspace = true
|
versions.workspace = true
|
||||||
|
|
||||||
[dependencies.slint]
|
[dependencies.slint]
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ edition.workspace = true
|
|||||||
[dependencies]
|
[dependencies]
|
||||||
log.workspace = true
|
log.workspace = true
|
||||||
serde.workspace = true
|
serde.workspace = true
|
||||||
serde_derive.workspace = true
|
|
||||||
zbus.workspace = true
|
zbus.workspace = true
|
||||||
concat-idents.workspace = true
|
concat-idents.workspace = true
|
||||||
udev.workspace = true
|
udev.workspace = true
|
||||||
|
|||||||
@@ -24,3 +24,6 @@ zbus = { workspace = true, optional = true }
|
|||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
cargo-husky.workspace = true
|
cargo-husky.workspace = true
|
||||||
|
|
||||||
|
[package.metadata.cargo-machete]
|
||||||
|
ignored = ["serde"]
|
||||||
|
|||||||
@@ -22,20 +22,14 @@ name = "rog_slash"
|
|||||||
path = "src/lib.rs"
|
path = "src/lib.rs"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
png_pong.workspace = true
|
|
||||||
pix.workspace = true
|
|
||||||
gif.workspace = true
|
|
||||||
log.workspace = true
|
|
||||||
|
|
||||||
serde.workspace = true
|
serde.workspace = true
|
||||||
serde_derive.workspace = true
|
serde_derive.workspace = true
|
||||||
|
|
||||||
glam.workspace = true
|
|
||||||
typeshare.workspace = true
|
typeshare.workspace = true
|
||||||
|
|
||||||
zbus = { workspace = true, optional = true }
|
zbus = { workspace = true, optional = true }
|
||||||
|
|
||||||
dmi_id = { path = "../dmi-id", optional = true }
|
dmi_id = { path = "../dmi-id", optional = true }
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
cargo-husky.workspace = true
|
cargo-husky.workspace = true
|
||||||
|
|
||||||
|
[package.metadata.cargo-machete]
|
||||||
|
ignored = ["serde"]
|
||||||
|
|||||||
@@ -15,11 +15,7 @@ path = "src/simulator.rs"
|
|||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
log.workspace = true
|
log.workspace = true
|
||||||
|
|
||||||
glam.workspace = true
|
|
||||||
|
|
||||||
uhid-virt = "^0.0.7"
|
uhid-virt = "^0.0.7"
|
||||||
|
|
||||||
rog_anime = { path = "../rog-anime", features = ["dbus"] }
|
rog_anime = { path = "../rog-anime", features = ["dbus"] }
|
||||||
|
|
||||||
[dependencies.sdl2]
|
[dependencies.sdl2]
|
||||||
|
|||||||
Reference in New Issue
Block a user