Skip to content

Commit

Permalink
ci: make clippy less annoying
Browse files Browse the repository at this point in the history
  • Loading branch information
seanmonstar committed Aug 21, 2023
1 parent cdcc641 commit 523d702
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ jobs:
steps:
- uses: actions/checkout@v3
- name: Run Clippy
run: cargo clippy --all-targets --all-features
run: cargo clippy --all-targets --all-features -- -A clippy::needless_pass_by_ref_mut

msrv:
name: Check MSRV
Expand Down
2 changes: 1 addition & 1 deletion src/hpack/decoder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,7 @@ fn decode_int<B: Buf>(buf: &mut B, prefix_size: u8) -> Result<usize, DecoderErro
Err(DecoderError::NeedMore(NeedMore::IntegerUnderflow))
}

fn peek_u8<B: Buf>(buf: &mut B) -> Option<u8> {
fn peek_u8<B: Buf>(buf: &B) -> Option<u8> {
if buf.has_remaining() {
Some(buf.chunk()[0])
} else {
Expand Down
9 changes: 2 additions & 7 deletions src/proto/streams/state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,9 @@ enum Inner {
Closed(Cause),
}

#[derive(Debug, Copy, Clone)]
#[derive(Debug, Copy, Clone, Default)]
enum Peer {
#[default]
AwaitingHeaders,
Streaming,
}
Expand Down Expand Up @@ -466,9 +467,3 @@ impl Default for State {
State { inner: Inner::Idle }
}
}

impl Default for Peer {
fn default() -> Self {
AwaitingHeaders
}
}

0 comments on commit 523d702

Please sign in to comment.