Skip to content

Commit 6c96252

Browse files
committed
Adding more lints to CI
1 parent 90e42ac commit 6c96252

File tree

3 files changed

+34
-9
lines changed

3 files changed

+34
-9
lines changed

Diff for: .github/workflows/lint.yml

+32-2
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,44 @@ jobs:
1414
runs-on: ubuntu-latest
1515
steps:
1616
- uses: actions/checkout@v2
17-
- name: Install latest nightly
17+
- name: Install rustc nightly
1818
uses: actions-rs/toolchain@v1
1919
with:
2020
toolchain: nightly
2121
override: true
2222
components: rustfmt
2323
- uses: actions-rs/cargo@v1
24-
name: Lints
24+
name: Formatting
2525
with:
2626
command: fmt
2727
args: --all -- --check
28+
clippy:
29+
runs-on: ubuntu-latest
30+
steps:
31+
- uses: actions/checkout@v2
32+
- name: Install rustc stable
33+
uses: actions-rs/toolchain@v1
34+
with:
35+
toolchain: stable
36+
override: true
37+
components: clippy
38+
- uses: actions-rs/cargo@v1
39+
name: Clippy
40+
with:
41+
command: clippy
42+
args: --workspace --all-features
43+
doc:
44+
runs-on: ubuntu-latest
45+
steps:
46+
- uses: actions/checkout@v2
47+
- name: Install rustc nightly
48+
uses: actions-rs/toolchain@v1
49+
with:
50+
toolchain: nightly
51+
override: true
52+
components: rust-docs
53+
- uses: actions-rs/cargo@v1
54+
name: Clippy
55+
with:
56+
command: doc
57+
args: --workspace --all-features

Diff for: src/session/noise/handshake.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -665,7 +665,7 @@ fn process_act_message(
665665

666666
fn private_key_to_public_key(private_key: &SecretKey) -> PublicKey {
667667
let curve = secp256k1::Secp256k1::new();
668-
668+
669669
PublicKey::from_secret_key(&curve, private_key)
670670
}
671671

Diff for: src/session/session.rs

+1-6
Original file line numberDiff line numberDiff line change
@@ -145,12 +145,7 @@ where
145145
raw: &[u8],
146146
) -> Result<usize, Error> {
147147
let writer = self.connection.as_sender();
148-
writer.send_routed(
149-
source,
150-
route,
151-
dest,
152-
&self.transcoder.encrypt(raw),
153-
)
148+
writer.send_routed(source, route, dest, &self.transcoder.encrypt(raw))
154149
}
155150

156151
#[inline]

0 commit comments

Comments
 (0)