From 1ac748ffa89af35b7accec940a996f441b72e298 Mon Sep 17 00:00:00 2001 From: Julian Frimmel Date: Sat, 30 Nov 2024 11:42:58 +0100 Subject: [PATCH 1/3] Fix some new 1.83 clippy lints --- src/valgrind/xml/mod.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/valgrind/xml/mod.rs b/src/valgrind/xml/mod.rs index 98c3cd9..661e522 100644 --- a/src/valgrind/xml/mod.rs +++ b/src/valgrind/xml/mod.rs @@ -164,7 +164,7 @@ pub struct Frame { } impl Display for Frame { fn fmt(&self, f: &mut Formatter) -> fmt::Result { - f.write_str(self.function.as_ref().unwrap_or(&"unknown".into()))?; + f.write_str(self.function.as_ref().map_or("unknown", |s| s.as_str()))?; if let Some(file) = &self.file { f.write_str(" (")?; f.write_str(file)?; @@ -183,7 +183,7 @@ fn deserialize_hex<'de, D: Deserializer<'de>>(deserializer: D) -> Result Visitor<'de> for HexVisitor { +impl Visitor<'_> for HexVisitor { type Value = u64; fn expecting(&self, f: &mut Formatter) -> fmt::Result { From 91300232529440ecde89edd3d36f6128c3f77516 Mon Sep 17 00:00:00 2001 From: Julian Frimmel Date: Sat, 30 Nov 2024 11:45:04 +0100 Subject: [PATCH 2/3] Update changelog --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8e258ac..ea0b673 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,9 @@ ## unreleased - Add more helpful error message if the program under test overflows its stack ([#93](https://github.com/jfrimmel/cargo-valgrind/pull/93)) +- Perform LTO on release ([#109](https://github.com/jfrimmel/cargo-valgrind/pull/109)) +- Updated documentation +- Raised MSRV to 1.58 ## Version 2.2.1 - Ensure, that consistent tag names are used ([#89](https://github.com/jfrimmel/cargo-valgrind/pull/89)). From 9cc1009d7e933edd27671c81b3d05a65a43d608b Mon Sep 17 00:00:00 2001 From: Julian Frimmel Date: Sat, 30 Nov 2024 11:47:19 +0100 Subject: [PATCH 3/3] Pin some CI jobs to specific rust versions Unfortunately, some new versions may change behavior, e.g. clippy may add lints, which break the build. Therefore it makes sense, to pin certain error prone CI-jobs to some specific versions. They should be bumped regularly, though. Currently, the following jobs are pinned: 1. the `ci/test`-job: as shown in #105, Rust 1.83 has introduced a valid "leak", which fails our tests for now. Therefore this job is pinned to 1.82, where this issue doesn't occur. A proper fix is necessary in the future (#107). 2. `clippy`: the latest [PR broke the clippy job][clippy-job] due to new lints being fired. Therefore the CI is pinned to 1.83 with the issues fixed. [clippy-job]: https://github.com/jfrimmel/cargo-valgrind/actions/runs/12095283463/job/33728289241 --- .github/workflows/ci.yaml | 1 + .github/workflows/style.yaml | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index fc9ee06..8e2f516 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -26,5 +26,6 @@ jobs: - uses: actions/checkout@v4 - name: Install valgrind run: sudo apt install valgrind + - run: rustup update --no-self-update 1.82 && rustup default 1.82 - name: Run tests run: cargo test diff --git a/.github/workflows/style.yaml b/.github/workflows/style.yaml index 615e052..3542015 100644 --- a/.github/workflows/style.yaml +++ b/.github/workflows/style.yaml @@ -20,7 +20,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - run: rustup update stable && rustup default stable + - run: rustup update --no-self-update 1.83 && rustup default 1.83 - run: rustup component add clippy - name: Run linter run: cargo clippy --color=always -- -D warnings