Skip to content

Commit

Permalink
Fix needless-lifetimes clippy lint (#113)
Browse files Browse the repository at this point in the history
  • Loading branch information
ia0 authored Oct 5, 2024
1 parent 4f42ad7 commit bbdd772
Show file tree
Hide file tree
Showing 4 changed files with 88 additions and 16 deletions.
96 changes: 81 additions & 15 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,24 @@ jobs:
- name: cd lib && cargo +nightly build --release --no-default-features
run: cargo +nightly build --release --no-default-features
working-directory: lib
- name: cd lib && cargo +nightly build --features=v3-preview
run: cargo +nightly build --features=v3-preview
working-directory: lib
- name: cd lib && cargo +nightly build --release --features=v3-preview
run: cargo +nightly build --release --features=v3-preview
working-directory: lib
- name: cd lib && cargo +nightly build --no-default-features --features=alloc --features=v3-preview
run: cargo +nightly build --no-default-features --features=alloc --features=v3-preview
working-directory: lib
- name: cd lib && cargo +nightly build --release --no-default-features --features=alloc --features=v3-preview
run: cargo +nightly build --release --no-default-features --features=alloc --features=v3-preview
working-directory: lib
- name: cd lib && cargo +nightly build --no-default-features --features=v3-preview
run: cargo +nightly build --no-default-features --features=v3-preview
working-directory: lib
- name: cd lib && cargo +nightly build --release --no-default-features --features=v3-preview
run: cargo +nightly build --release --no-default-features --features=v3-preview
working-directory: lib
- name: cd lib/macro/internal && cargo +nightly build
run: cargo +nightly build
working-directory: lib/macro/internal
Expand Down Expand Up @@ -109,6 +127,9 @@ jobs:
- name: cd lib && cargo +nightly test
run: cargo +nightly test
working-directory: lib
- name: cd lib && cargo +nightly test --features=v3-preview
run: cargo +nightly test --features=v3-preview
working-directory: lib
- name: cd lib/macro/internal && cargo +nightly test
run: cargo +nightly test
working-directory: lib/macro/internal
Expand Down Expand Up @@ -139,9 +160,15 @@ jobs:
- name: cd lib && cargo +nightly miri test
run: cargo +nightly miri test
working-directory: lib
- name: cd lib && cargo +nightly miri test --features=v3-preview
run: cargo +nightly miri test --features=v3-preview
working-directory: lib
- name: cd lib && cargo +nightly bench
run: cargo +nightly bench
working-directory: lib
- name: cd lib && cargo +nightly bench --features=v3-preview
run: cargo +nightly bench --features=v3-preview
working-directory: lib
- run: cd bin && ./bench.sh +nightly
- name: cd lib && cargo +nightly audit --deny=warnings
run: cargo +nightly audit --deny=warnings
Expand All @@ -152,21 +179,6 @@ jobs:
- name: cd lib/macro && cargo +nightly audit --deny=warnings
run: cargo +nightly audit --deny=warnings
working-directory: lib/macro
- name: cd bin && cargo +nightly audit --deny=warnings
run: cargo +nightly audit --deny=warnings
working-directory: bin
- name: cd nostd && cargo +nightly audit --deny=warnings
run: cargo +nightly audit --deny=warnings
working-directory: nostd
- name: cd lib/fuzz && cargo +nightly audit --deny=warnings
run: cargo +nightly audit --deny=warnings
working-directory: lib/fuzz
- name: cd cmp && cargo +nightly audit --deny=warnings
run: cargo +nightly audit --deny=warnings
working-directory: cmp
- name: cd www && cargo +nightly audit --deny=warnings
run: cargo +nightly audit --deny=warnings
working-directory: www
- run: rustup install stable
- run: cargo +stable install cargo-semver-checks
- name: cd lib && cargo +stable build
Expand All @@ -187,6 +199,24 @@ jobs:
- name: cd lib && cargo +stable build --release --no-default-features
run: cargo +stable build --release --no-default-features
working-directory: lib
- name: cd lib && cargo +stable build --features=v3-preview
run: cargo +stable build --features=v3-preview
working-directory: lib
- name: cd lib && cargo +stable build --release --features=v3-preview
run: cargo +stable build --release --features=v3-preview
working-directory: lib
- name: cd lib && cargo +stable build --no-default-features --features=alloc --features=v3-preview
run: cargo +stable build --no-default-features --features=alloc --features=v3-preview
working-directory: lib
- name: cd lib && cargo +stable build --release --no-default-features --features=alloc --features=v3-preview
run: cargo +stable build --release --no-default-features --features=alloc --features=v3-preview
working-directory: lib
- name: cd lib && cargo +stable build --no-default-features --features=v3-preview
run: cargo +stable build --no-default-features --features=v3-preview
working-directory: lib
- name: cd lib && cargo +stable build --release --no-default-features --features=v3-preview
run: cargo +stable build --release --no-default-features --features=v3-preview
working-directory: lib
- name: cd lib/macro/internal && cargo +stable build
run: cargo +stable build
working-directory: lib/macro/internal
Expand Down Expand Up @@ -277,6 +307,24 @@ jobs:
- name: cd lib && cargo +nightly build --release --no-default-features
run: cargo +nightly build --release --no-default-features
working-directory: lib
- name: cd lib && cargo +nightly build --features=v3-preview
run: cargo +nightly build --features=v3-preview
working-directory: lib
- name: cd lib && cargo +nightly build --release --features=v3-preview
run: cargo +nightly build --release --features=v3-preview
working-directory: lib
- name: cd lib && cargo +nightly build --no-default-features --features=alloc --features=v3-preview
run: cargo +nightly build --no-default-features --features=alloc --features=v3-preview
working-directory: lib
- name: cd lib && cargo +nightly build --release --no-default-features --features=alloc --features=v3-preview
run: cargo +nightly build --release --no-default-features --features=alloc --features=v3-preview
working-directory: lib
- name: cd lib && cargo +nightly build --no-default-features --features=v3-preview
run: cargo +nightly build --no-default-features --features=v3-preview
working-directory: lib
- name: cd lib && cargo +nightly build --release --no-default-features --features=v3-preview
run: cargo +nightly build --release --no-default-features --features=v3-preview
working-directory: lib
- name: cd lib/macro/internal && cargo +nightly build
run: cargo +nightly build
working-directory: lib/macro/internal
Expand Down Expand Up @@ -314,6 +362,24 @@ jobs:
- name: cd lib && cargo +stable build --release --no-default-features
run: cargo +stable build --release --no-default-features
working-directory: lib
- name: cd lib && cargo +stable build --features=v3-preview
run: cargo +stable build --features=v3-preview
working-directory: lib
- name: cd lib && cargo +stable build --release --features=v3-preview
run: cargo +stable build --release --features=v3-preview
working-directory: lib
- name: cd lib && cargo +stable build --no-default-features --features=alloc --features=v3-preview
run: cargo +stable build --no-default-features --features=alloc --features=v3-preview
working-directory: lib
- name: cd lib && cargo +stable build --release --no-default-features --features=alloc --features=v3-preview
run: cargo +stable build --release --no-default-features --features=alloc --features=v3-preview
working-directory: lib
- name: cd lib && cargo +stable build --no-default-features --features=v3-preview
run: cargo +stable build --no-default-features --features=v3-preview
working-directory: lib
- name: cd lib && cargo +stable build --release --no-default-features --features=v3-preview
run: cargo +stable build --release --no-default-features --features=v3-preview
working-directory: lib
- name: cd lib/macro/internal && cargo +stable build
run: cargo +stable build
working-directory: lib/macro/internal
Expand Down
1 change: 1 addition & 0 deletions lib/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

### Patch

- Fix `needless-lifetimes` clippy lint
- Improve documentation of `Encoding::decode_len()` (fixes #111)

## 2.6.0
Expand Down
2 changes: 1 addition & 1 deletion lib/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1631,7 +1631,7 @@ pub struct Encoder<'a> {
}

#[cfg(feature = "alloc")]
impl<'a> Drop for Encoder<'a> {
impl Drop for Encoder<'_> {
fn drop(&mut self) {
self.encoding.encode_append(&self.buffer[.. self.length as usize], self.output);
}
Expand Down
5 changes: 5 additions & 0 deletions xtask/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -496,6 +496,11 @@ impl Actions {
// SemverChecks only guarantees support for stable.
toolchain = Toolchain::Stable;
}
// TODO(https://github.com/rustsec/rustsec/pull/1206): Remove when released.
if task == Task::Audit && !matches!(dir, Dir::Lib | Dir::MacroInternal | Dir::Macro)
{
continue;
}
actions.insert(Action { os, toolchain, task, dir });
}
}
Expand Down

0 comments on commit bbdd772

Please sign in to comment.