From cf28a5f46c71222f850229d10bcac34978b45426 Mon Sep 17 00:00:00 2001 From: Ryan Levick Date: Wed, 3 Jan 2024 12:08:54 +0100 Subject: [PATCH 1/2] Make clippy happy Signed-off-by: Ryan Levick --- src/lib.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/lib.rs b/src/lib.rs index 449083e..11ae1ba 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -11,6 +11,8 @@ #![forbid(unsafe_code)] #![deny(missing_docs)] #![cfg_attr(not(feature = "std"), no_std)] +// Allow identity ops for readability +#![allow(clippy::identity_op)] use core::fmt; @@ -94,6 +96,11 @@ impl ConstSlice { self.head } + /// Whether the buffer is empty or not. + pub const fn is_empty(&self) -> bool { + self.len() == 0 + } + /// Get the buffer as a slice. pub const fn as_slice(&self) -> &[u8] { &self.data From 262d686a5c6471a99e88916497e43d63592cb878 Mon Sep 17 00:00:00 2001 From: Ryan Levick Date: Wed, 3 Jan 2024 12:13:06 +0100 Subject: [PATCH 2/2] Run msrv in CI Signed-off-by: Ryan Levick --- .github/workflows/build.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 83bf1d0..eb855bb 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -11,12 +11,15 @@ env: jobs: test: + strategy: + matrix: + rust-version: ["stable", "1.46.0"] runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - uses: actions-rs/toolchain@v1 with: - toolchain: stable + toolchain: ${{ matrix.rust-version }} profile: minimal override: true components: rustfmt