Skip to content

Commit f253ef7

Browse files
committed
chore: bump rust edition and deps
1 parent 043909b commit f253ef7

File tree

4 files changed

+18
-13
lines changed

4 files changed

+18
-13
lines changed

Cargo.lock

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

Cargo.toml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,20 @@
22
name = "stats_provider"
33
version = "0.8.1"
44
description = "A simple system stats event provider for Sketchybar."
5-
edition = "2021"
5+
edition = "2024"
66
build = "build.rs"
77

88
[dependencies]
9-
anyhow = "1.0.101"
10-
clap = { version = "4.5.58", features = ["derive"] }
9+
anyhow = "1.0.102"
10+
clap = { version = "4.5.60", features = ["derive"] }
1111
fs2 = "0.4.3"
1212
starship-battery = "0.10.3"
13-
sysinfo = { version = "0.38.2", default-features = false, features = ["component", "disk", "network", "system"] }
13+
sysinfo = { version = "0.38.2", default-features = false, features = [
14+
"component",
15+
"disk",
16+
"network",
17+
"system",
18+
] }
1419
tokio = { version = "1", features = ["full"] }
1520

1621
[build-dependencies]

src/main.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -267,13 +267,13 @@ fn acquire_lock() -> Option<File> {
267267
#[cfg(target_os = "macos")]
268268
#[tokio::main]
269269
async fn main() -> Result<()> {
270+
let cli = cli::parse_args();
271+
270272
let _lock = match acquire_lock() {
271273
Some(lock) => lock,
272274
None => return Ok(()),
273275
};
274276

275-
let cli = cli::parse_args();
276-
277277
cli::validate_cli(&cli).context("Invalid CLI arguments")?;
278278

279279
println!("SketchyBar Stats Provider is running.");

src/sketchybar.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ use tokio::time::{Duration, Instant};
99
const PORT_REFRESH_INTERVAL_SECS: u64 = 300;
1010

1111
#[link(name = "sketchybar", kind = "static")]
12-
extern "C" {
12+
unsafe extern "C" {
1313
fn sketchybar(message: *const c_char, bar_name: *const c_char) -> *mut c_char;
1414
fn free_sketchybar_response(response: *mut c_char);
1515
fn cleanup_sketchybar();

0 commit comments

Comments
 (0)