Skip to content

Commit 4862286

Browse files
committed
Update dependencies
1 parent 5a179d4 commit 4862286

File tree

9 files changed

+428
-212
lines changed

9 files changed

+428
-212
lines changed

Cargo.lock

Lines changed: 384 additions & 172 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

surface-dtx-daemon/Cargo.toml

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -11,24 +11,24 @@ edition = "2018"
1111
build = "build.rs"
1212

1313
[dependencies]
14-
anyhow = "1.0.65"
14+
anyhow = "1.0.70"
1515
atty = "0.2.14"
16-
clap = { version = "3.2.22", features = ["cargo"] }
17-
dbus = "0.9.6"
18-
dbus-tokio = "0.7.5"
19-
dbus-crossroads = "0.5.1"
20-
futures = "0.3.24"
21-
libc = "0.2.134"
22-
nix = "0.25.0"
16+
clap = { version = "4.2.3", features = ["cargo"] }
17+
dbus = "0.9.7"
18+
dbus-tokio = "0.7.6"
19+
dbus-crossroads = "0.5.2"
20+
futures = "0.3.28"
21+
libc = "0.2.141"
22+
nix = "0.26.2"
2323
sdtx = { git = "https://github.com/linux-surface/libsurfacedtx", tag = "v0.1.3" }
2424
sdtx-tokio = { git = "https://github.com/linux-surface/libsurfacedtx", tag = "v0.1.3" }
25-
serde = { version = "1.0.145", features = ['derive'] }
26-
tokio = { version = "1.24.2", features = ["fs", "sync", "process", "signal", "io-util", "rt", "macros"] }
27-
toml = "0.5.9"
28-
serde_ignored = "0.1.5"
25+
serde = { version = "1.0.160", features = ['derive'] }
26+
tokio = { version = "1.27.0", features = ["fs", "sync", "process", "signal", "io-util", "rt", "macros"] }
27+
toml = "0.7.3"
28+
serde_ignored = "0.1.7"
2929
tracing = "0.1.37"
3030
tracing-subscriber = { version = "0.3.16", features = ["std", "env-filter"] }
3131

3232
[build-dependencies]
33-
clap = "3.2.22"
34-
clap_complete = "3.2.5"
33+
clap = "4.2.3"
34+
clap_complete = "4.2.0"

surface-dtx-daemon/src/cli.rs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
use clap::{Arg, Command};
1+
use clap::{Arg, Command, ArgAction};
22

3-
pub fn app() -> Command<'static> {
3+
pub fn app() -> Command {
44
Command::new("Surface DTX Daemon")
55
.about(clap::crate_description!())
66
.version(clap::crate_version!())
@@ -10,8 +10,9 @@ pub fn app() -> Command<'static> {
1010
.long("config")
1111
.value_name("FILE")
1212
.help("Use the specified config file")
13-
.takes_value(true))
13+
.value_parser(clap::value_parser!(std::path::PathBuf)))
1414
.arg(Arg::new("no-log-time")
1515
.long("no-log-time")
16-
.help("Do not emit timestamps in log"))
16+
.help("Do not emit timestamps in log")
17+
.action(ArgAction::SetTrue))
1718
}

surface-dtx-daemon/src/config.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ impl Config {
102102
let data = std::str::from_utf8(&buf)
103103
.with_context(|| format!("Failed to read config file (path: {:?})", path.as_ref()))?;
104104

105-
let de = &mut toml::Deserializer::new(data);
105+
let de = toml::Deserializer::new(data);
106106

107107
let mut unknowns = BTreeSet::new();
108108
let mut config: Config = serde_ignored::deserialize(de, |path| {

surface-dtx-daemon/src/main.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ mod service;
1313
use service::Service;
1414

1515

16-
use std::sync::{Arc, Mutex};
16+
use std::{sync::{Arc, Mutex}, path::PathBuf};
1717

1818
use anyhow::{Context, Result};
1919

@@ -34,7 +34,7 @@ fn bootstrap() -> Result<Config> {
3434
let matches = cli::app().get_matches();
3535

3636
// set up config
37-
let (config, diag) = match matches.value_of("config") {
37+
let (config, diag) = match matches.get_one::<PathBuf>("config") {
3838
Some(path) => Config::load_file(path)?,
3939
None => Config::load()?,
4040
};
@@ -50,7 +50,7 @@ fn bootstrap() -> Result<Config> {
5050
.with_env_filter(filter)
5151
.with_ansi(atty::is(atty::Stream::Stdout));
5252

53-
if matches.is_present("no-log-time") {
53+
if matches.get_flag("no-log-time") {
5454
subscriber.without_time().init();
5555
} else {
5656
subscriber.init();

surface-dtx-userd/Cargo.toml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,19 +11,19 @@ edition = "2018"
1111
build = "build.rs"
1212

1313
[dependencies]
14-
anyhow = "1.0.65"
14+
anyhow = "1.0.70"
1515
atty = "0.2.14"
16-
clap = { version = "3.2.22", features = ["cargo"] }
17-
dbus = "0.9.6"
18-
dbus-tokio = "0.7.5"
19-
futures = "0.3.24"
20-
serde = { version = "1.0.145", features = ["derive"] }
21-
serde_ignored = "0.1.5"
22-
tokio = { version = "1.24.2", features = ["macros", "rt", "signal"] }
23-
toml = "0.5.9"
16+
clap = { version = "4.2.3", features = ["cargo"] }
17+
dbus = "0.9.7"
18+
dbus-tokio = "0.7.6"
19+
futures = "0.3.28"
20+
serde = { version = "1.0.160", features = ["derive"] }
21+
serde_ignored = "0.1.7"
22+
tokio = { version = "1.27.0", features = ["macros", "rt", "signal"] }
23+
toml = "0.7.3"
2424
tracing = "0.1.37"
2525
tracing-subscriber = { version = "0.3.16", features = ["std", "env-filter"] }
2626

2727
[build-dependencies]
28-
clap = "3.2.22"
29-
clap_complete = "3.2.5"
28+
clap = "4.2.3"
29+
clap_complete = "4.2.0"

surface-dtx-userd/src/cli.rs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
use clap::{Arg, Command};
1+
use clap::{Arg, Command, ArgAction};
22

3-
pub fn app() -> Command<'static> {
3+
pub fn app() -> Command {
44
Command::new("Surface DTX User Daemon")
55
.about(clap::crate_description!())
66
.version(clap::crate_version!())
@@ -10,8 +10,9 @@ pub fn app() -> Command<'static> {
1010
.long("config")
1111
.value_name("FILE")
1212
.help("Use the specified config file")
13-
.takes_value(true))
13+
.value_parser(clap::value_parser!(std::path::PathBuf)))
1414
.arg(Arg::new("no-log-time")
1515
.long("no-log-time")
16-
.help("Do not emit timestamps in log"))
16+
.help("Do not emit timestamps in log")
17+
.action(ArgAction::SetTrue))
1718
}

surface-dtx-userd/src/config.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ impl Config {
6666
let data = std::str::from_utf8(&buf)
6767
.with_context(|| format!("Failed to read config file (path: {:?})", path.as_ref()))?;
6868

69-
let de = &mut toml::Deserializer::new(data);
69+
let de = toml::Deserializer::new(data);
7070

7171
let mut unknowns = BTreeSet::new();
7272
let mut config: Config = serde_ignored::deserialize(de, |path| {

surface-dtx-userd/src/main.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ mod config;
33
mod logic;
44
mod utils;
55

6+
use std::path::PathBuf;
7+
68
use crate::config::Config;
79

810
use anyhow::{Context, Result};
@@ -16,7 +18,7 @@ fn bootstrap() -> Result<Config> {
1618
let matches = cli::app().get_matches();
1719

1820
// set up config
19-
let (config, diag) = match matches.value_of("config") {
21+
let (config, diag) = match matches.get_one::<PathBuf>("config") {
2022
Some(path) => Config::load_file(path)?,
2123
None => Config::load()?,
2224
};
@@ -32,7 +34,7 @@ fn bootstrap() -> Result<Config> {
3234
.with_env_filter(filter)
3335
.with_ansi(atty::is(atty::Stream::Stdout));
3436

35-
if matches.is_present("no-log-time") {
37+
if matches.get_flag("no-log-time") {
3638
subscriber.without_time().init();
3739
} else {
3840
subscriber.init();

0 commit comments

Comments
 (0)