From 4ca47a4a601feafc713b81e37aae4654992a6bc8 Mon Sep 17 00:00:00 2001 From: Cameron Garnham Date: Sun, 8 Oct 2023 17:12:40 +0200 Subject: [PATCH 1/2] fixup: ignore new clippy warning --- .vscode/settings.json | 2 +- contrib/bencode/src/access/list.rs | 8 ++++++++ contrib/bencode/src/error.rs | 2 ++ 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index 661243fbe..038da4c18 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -18,7 +18,7 @@ "-W", "clippy::style", "-W", - "clippy::pedantic", + "clippy::pedantic" ], "evenBetterToml.formatter.allowedBlankLines": 1, "evenBetterToml.formatter.columnWidth": 130, diff --git a/contrib/bencode/src/access/list.rs b/contrib/bencode/src/access/list.rs index 840bffa1e..c6d1fc407 100644 --- a/contrib/bencode/src/access/list.rs +++ b/contrib/bencode/src/access/list.rs @@ -45,6 +45,14 @@ impl<'a, V: 'a> IndexMut for &'a mut dyn BListAccess { } } +impl<'a, V: 'a> dyn BListAccess { + pub fn iter(&'a self) -> impl Iterator { + self.into_iter() + } +} + +#[allow(unknown_lints)] +#[allow(clippy::into_iter_without_iter)] impl<'a, V: 'a> IntoIterator for &'a dyn BListAccess { type Item = &'a V; type IntoIter = BListIter<'a, V>; diff --git a/contrib/bencode/src/error.rs b/contrib/bencode/src/error.rs index 18ebe9605..54c589e3e 100644 --- a/contrib/bencode/src/error.rs +++ b/contrib/bencode/src/error.rs @@ -1,3 +1,5 @@ +#![allow(unknown_lints)] +#![allow(clippy::iter_without_into_iter)] use error_chain::error_chain; error_chain! { From be914b6719867898376a96b22dba605ca6689078 Mon Sep 17 00:00:00 2001 From: Cameron Garnham Date: Sat, 7 Oct 2023 10:38:40 +0200 Subject: [PATCH 2/2] ci: re-enable llvm-cov coverage --- .github/workflows/testing.yaml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/testing.yaml b/.github/workflows/testing.yaml index 21c47665f..f138a95cc 100644 --- a/.github/workflows/testing.yaml +++ b/.github/workflows/testing.yaml @@ -104,7 +104,6 @@ jobs: name: Run Unit Tests run: cargo test --tests --benches --examples --workspace --all-targets --all-features - # Temporary Disable https://github.com/time-rs/time/issues/618 - # - id: coverage - # name: Generate Coverage Report - # run: cargo llvm-cov nextest --tests --benches --examples --workspace --all-targets --all-features + - id: coverage + name: Generate Coverage Report + run: cargo llvm-cov nextest --tests --benches --examples --workspace --all-targets --all-features