From 54eead3bcbfc3f3085bb2dd60adbc790363330ca Mon Sep 17 00:00:00 2001 From: lennard Date: Tue, 13 Jun 2023 20:39:54 +0200 Subject: [PATCH] more dependencies and exclude ksin on other platforms --- .github/workflows/rust.yml | 6 +----- Cargo.toml | 2 ++ src/bin/cli_app.rs | 3 +-- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index c489279..b37ff4e 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -14,8 +14,6 @@ jobs: runs-on: macos-latest steps: - uses: actions/checkout@v3 - - name: Install Dependencies - run: brew install dbus - name: Build run: cargo build --verbose --bin cli_app - name: test @@ -25,8 +23,6 @@ jobs: runs-on: windows-latest steps: - uses: actions/checkout@v3 - - name: Install Dependencies - run: choco install dbus -y - name: Build run: cargo build --verbose --bin cli_app - name: test @@ -37,7 +33,7 @@ jobs: steps: - uses: actions/checkout@v3 - name: Install Dependencies - run: sudo apt update && sudo apt install -y libdbus-1-dev libhidapi-dev libusb-1.0-0-dev + run: sudo apt update && sudo apt install -y libdbus-1-dev libhidapi-dev libusb-1.0-0-dev libudev-dev - name: Build run: cargo build --verbose - name: test diff --git a/Cargo.toml b/Cargo.toml index 91f56c9..314a5bd 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -8,4 +8,6 @@ edition = "2021" [dependencies] hidapi = "2.3.3" thiserror = "1.0.40" + +[target.'cfg(unix)'.dependencies] ksni = "0.2.0" \ No newline at end of file diff --git a/src/bin/cli_app.rs b/src/bin/cli_app.rs index 265190c..b310019 100644 --- a/src/bin/cli_app.rs +++ b/src/bin/cli_app.rs @@ -22,7 +22,6 @@ fn main() { fn test_basic_device_access() { let mut device = match Device::new() { Ok(device) => device, - Err(error) => return + Err(_) => return }; - device.update_battery_level(); } \ No newline at end of file