Skip to content

Commit 5812c4a

Browse files
authored
Merge branch 'develop' into fix/5502
2 parents 0220adb + 952d939 commit 5812c4a

File tree

3 files changed

+43
-5
lines changed

3 files changed

+43
-5
lines changed

.github/workflows/clippy.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
## Perform Clippy checks - currently set to defaults
2+
## https://github.com/rust-lang/rust-clippy#usage
3+
## https://rust-lang.github.io/rust-clippy/master/index.html
4+
##
5+
name: Clippy Checks
6+
7+
# Only run when:
8+
# - PRs are (re)opened against develop branch
9+
on:
10+
pull_request:
11+
branches:
12+
- develop
13+
types:
14+
- opened
15+
- reopened
16+
- synchronize
17+
18+
jobs:
19+
clippy_check:
20+
name: Clippy Check
21+
runs-on: ubuntu-latest
22+
steps:
23+
- name: Checkout the latest code
24+
id: git_checkout
25+
uses: actions/checkout@v3
26+
- name: Define Rust Toolchain
27+
id: define_rust_toolchain
28+
run: echo "RUST_TOOLCHAIN=$(cat ./rust-toolchain)" >> $GITHUB_ENV
29+
- name: Setup Rust Toolchain
30+
id: setup_rust_toolchain
31+
uses: actions-rust-lang/setup-rust-toolchain@v1
32+
with:
33+
toolchain: ${{ env.RUST_TOOLCHAIN }}
34+
components: clippy
35+
- name: Clippy
36+
id: clippy
37+
uses: actions-rs/clippy-check@v1
38+
with:
39+
token: ${{ secrets.GITHUB_TOKEN }}
40+
args: -p libstackerdb -p stacks-signer -p pox-locking --no-deps --tests --all-features -- -D warnings

stacks-signer/src/chainstate.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ enum ProposedBy<'a> {
176176
CurrentSortition(&'a SortitionState),
177177
}
178178

179-
impl<'a> ProposedBy<'a> {
179+
impl ProposedBy<'_> {
180180
pub fn state(&self) -> &SortitionState {
181181
match self {
182182
ProposedBy::LastSortition(x) => x,

stacks-signer/src/cli.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,9 @@ use stacks_common::types::chainstate::StacksPrivateKey;
4141

4242
extern crate alloc;
4343

44-
#[derive(Parser, Debug)]
45-
#[command(author, version, about)]
46-
#[command(long_version = VERSION_STRING.as_str())]
47-
4844
/// The CLI arguments for the stacks signer
45+
#[derive(Parser, Debug)]
46+
#[command(author, version, about, long_version = VERSION_STRING.as_str())]
4947
pub struct Cli {
5048
/// Subcommand action to take
5149
#[command(subcommand)]

0 commit comments

Comments
 (0)