get rid of cstr dependency

This commit is contained in:
galister
2025-04-07 04:46:47 +09:00
parent 3dd31ec468
commit bc6c510af1
3 changed files with 14 additions and 27 deletions

31
Cargo.lock generated
View File

@@ -1126,16 +1126,6 @@ dependencies = [
"typenum",
]
[[package]]
name = "cstr"
version = "0.2.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "68523903c8ae5aacfa32a0d9ae60cadeb764e1da14ee0d26b1f3089f13a54636"
dependencies = [
"proc-macro2",
"quote",
]
[[package]]
name = "ctrlc"
version = "3.4.6"
@@ -1154,9 +1144,9 @@ checksum = "96a6ac251f4a2aca6b3f91340350eab87ae57c3f127ffeb585e92bd336717991"
[[package]]
name = "cxx"
version = "1.0.153"
version = "1.0.155"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4b4ab2681454aacfe7ce296ebc6df86791009f237f8020b0c752e8b245ba7c1d"
checksum = "76751bca18309cbce06f9821698d6c05b3af5c3fde8af5caf57f11611729397b"
dependencies = [
"cc",
"cxxbridge-cmd",
@@ -1168,9 +1158,9 @@ dependencies = [
[[package]]
name = "cxx-gen"
version = "0.7.153"
version = "0.7.155"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "eaf41c22ee2f91421f55528fc24d024581cb54fa524506b36091ed676f3bee96"
checksum = "47f8cf383c7f4920c90d0d003f72702cd7e540f69e5cb5959632f94fa589b915"
dependencies = [
"codespan-reporting",
"proc-macro2",
@@ -1180,9 +1170,9 @@ dependencies = [
[[package]]
name = "cxxbridge-cmd"
version = "1.0.153"
version = "1.0.155"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7cbc41933767955d04c2a90151806029b93df5fd8b682ba22a967433347480a9"
checksum = "78ce717e582fc3b56bd2f1eb3cda9916e9b4629721e4c2ce637ac5e7d4beef11"
dependencies = [
"clap",
"codespan-reporting",
@@ -1193,15 +1183,15 @@ dependencies = [
[[package]]
name = "cxxbridge-flags"
version = "1.0.153"
version = "1.0.155"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9133547634329a5b76e5f58d1e53c16d627699bbcd421b9007796311165f9667"
checksum = "aa7fdd4b264a3335a8b21221092bd2fbfba35c3606bd50feb28d22ba3fb0a6e5"
[[package]]
name = "cxxbridge-macro"
version = "1.0.153"
version = "1.0.155"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "53e89d77ad5fd6066a3d42d94de3f72a2f23f95006da808177624429b5183596"
checksum = "c36a0a2b78ff9232a3dc584340471d4fa1751a81026cf62f3661a06d5a8bae17"
dependencies = [
"proc-macro2",
"quote",
@@ -5308,7 +5298,6 @@ dependencies = [
"chrono-tz",
"clap",
"config",
"cstr",
"ctrlc",
"dbus",
"fontconfig-rs",

View File

@@ -22,7 +22,6 @@ chrono = "0.4.38"
chrono-tz = "0.10.0"
clap = { version = "4.5.6", features = ["derive"] }
config = "0.15.11"
cstr = "0.2.12"
ctrlc = { version = "3.4.4", features = ["termination"] }
dbus = { version = "0.9.7" }
fontconfig-rs = "0.1.1"

View File

@@ -99,12 +99,11 @@ impl From<OVRError> for BackendError {
}
}
use cstr::cstr;
const STEAMVR_SECTION: &CStr = cstr!("steamvr");
const STEAMVR_SECTION: &CStr = c"steamvr";
const COLOR_GAIN_CSTR: [&CStr; 3] = [
cstr!("hmdDisplayColorGainR"),
cstr!("hmdDisplayColorGainG"),
cstr!("hmdDisplayColorGainB"),
c"hmdDisplayColorGainR",
c"hmdDisplayColorGainG",
c"hmdDisplayColorGainB",
];
pub(super) fn adjust_gain(