diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 7bc4c7e0..c0368075 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -8,6 +8,7 @@ on: env: CARGO_TERM_COLOR: always + RUSTFLAGS: '-Dwarnings' # Never tolerate warnings. jobs: build: diff --git a/test-harness/src/lib.rs b/test-harness/src/lib.rs index 4c4820cc..188d4791 100644 --- a/test-harness/src/lib.rs +++ b/test-harness/src/lib.rs @@ -451,6 +451,7 @@ impl Arbitrary for TestConfig { c.set_window_update_mode(if bool::arbitrary(g) { WindowUpdateMode::OnRead } else { + #[allow(deprecated)] WindowUpdateMode::OnReceive }); c.set_read_after_close(Arbitrary::arbitrary(g)); diff --git a/yamux/src/connection/cleanup.rs b/yamux/src/connection/cleanup.rs index b4dfa816..87c6d0ca 100644 --- a/yamux/src/connection/cleanup.rs +++ b/yamux/src/connection/cleanup.rs @@ -33,7 +33,7 @@ impl Future for Cleanup { type Output = ConnectionError; fn poll(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll { - let mut this = self.get_mut(); + let this = self.get_mut(); loop { match this.state { diff --git a/yamux/src/connection/closing.rs b/yamux/src/connection/closing.rs index d503941f..b02c465e 100644 --- a/yamux/src/connection/closing.rs +++ b/yamux/src/connection/closing.rs @@ -45,7 +45,7 @@ where type Output = Result<()>; fn poll(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll { - let mut this = self.get_mut(); + let this = self.get_mut(); loop { match this.state { diff --git a/yamux/src/frame/io.rs b/yamux/src/frame/io.rs index 795d9f5c..43e03987 100644 --- a/yamux/src/frame/io.rs +++ b/yamux/src/frame/io.rs @@ -171,7 +171,7 @@ impl Stream for Io { type Item = Result, FrameDecodeError>; fn poll_next(mut self: Pin<&mut Self>, cx: &mut Context) -> Poll> { - let mut this = &mut *self; + let this = &mut *self; loop { log::trace!("{}: read: {:?}", this.id, this.read_state); match this.read_state {