diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 111b5cd..bf979f4 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -19,13 +19,13 @@ jobs: - name: Format run: cargo fmt --check - name: Clippy - run: cargo clippy + run: cargo clippy && cargo clippy --all-features - name: Build - run: cargo build --verbose + run: cargo build --verbose --all-features - name: Run tests run: cargo test --verbose - name: Doc - run: cargo doc + run: cargo doc --all-features cross-linux: runs-on: ubuntu-latest @@ -68,12 +68,12 @@ jobs: run: cargo doc --target ${{ matrix.target.rust }} freebsd: - runs-on: macos-12 + runs-on: ubuntu-latest name: build (FreeBSD) steps: - uses: actions/checkout@v3 - name: Build - uses: vmactions/freebsd-vm@v0 + uses: vmactions/freebsd-vm@v1 with: envs: 'RUSTFLAGS' usesh: true @@ -83,5 +83,5 @@ jobs: run: | curl https://sh.rustup.rs -sSf | sh -s -- --profile minimal -y . "$HOME/.cargo/env" - cargo build + cargo build --all-features cargo test diff --git a/Cargo.toml b/Cargo.toml index 053d9dc..af22f93 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -7,7 +7,7 @@ license = "Apache-2.0 OR MIT" repository = "https://github.com/cmr/evdev" documentation = "https://docs.rs/evdev" edition = "2021" -rust-version = "1.63" +rust-version = "1.64" [features] serde = ["dep:serde"] diff --git a/src/event_variants.rs b/src/event_variants.rs index a531605..b1619fe 100644 --- a/src/event_variants.rs +++ b/src/event_variants.rs @@ -111,7 +111,7 @@ macro_rules! input_event_newtype { } impl Deref for $name { type Target = InputEvent; - fn deref<'a>(&'a self) -> &'a InputEvent { + fn deref(&self) -> &InputEvent { &self.0 } } diff --git a/src/lib.rs b/src/lib.rs index 3d4e560..5e8451c 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -536,7 +536,7 @@ fn fd_write_all(fd: std::os::fd::BorrowedFd<'_>, mut data: &[u8]) -> nix::Result match nix::unistd::write(fd, data) { Ok(0) => return Ok(()), Ok(n) => data = &data[n..], - Err(e) if e == nix::Error::EINTR => {} + Err(nix::Error::EINTR) => {} Err(e) => return Err(e), } } diff --git a/src/sync_stream.rs b/src/sync_stream.rs index dda9e13..c45c176 100644 --- a/src/sync_stream.rs +++ b/src/sync_stream.rs @@ -571,7 +571,7 @@ fn compensate_events(state: &mut Option, dev: &mut Device) -> Option< } } -impl<'a> Iterator for FetchEventsSynced<'a> { +impl Iterator for FetchEventsSynced<'_> { type Item = InputEvent; fn next(&mut self) -> Option { // first: check if we need to emit compensatory events due to a SYN_DROPPED we found in the @@ -599,7 +599,7 @@ impl<'a> Iterator for FetchEventsSynced<'a> { } } -impl<'a> Drop for FetchEventsSynced<'a> { +impl Drop for FetchEventsSynced<'_> { fn drop(&mut self) { self.dev.raw.event_buf.drain(..self.consumed_to); }