vector: compatibility with rust 1.71

This commit is contained in:
Theodore Ni 2023-07-22 22:46:26 -07:00 committed by Yt
parent ad566c449d
commit 33916d2336
2 changed files with 26 additions and 0 deletions

View File

@ -45,6 +45,10 @@ rustPlatform.buildRustPackage {
hash = "sha256-+ATOHx+LQLQV4nMdj1FRRvDTqGCTbX9kl290AbY9Vw0=";
};
patches = [
./rust-1.71-unnecessary-mut.diff
];
cargoLock = {
lockFile = ./Cargo.lock;
outputHashes = {

View File

@ -0,0 +1,22 @@
diff --git a/lib/vector-core/src/tls/incoming.rs b/lib/vector-core/src/tls/incoming.rs
index 5d2fd1cdb..7992f2c2b 100644
--- a/lib/vector-core/src/tls/incoming.rs
+++ b/lib/vector-core/src/tls/incoming.rs
@@ -263,7 +263,7 @@ impl MaybeTlsIncomingStream<TcpStream> {
where
F: FnOnce(Pin<&mut MaybeTlsStream<TcpStream>>, &mut Context) -> Poll<io::Result<T>>,
{
- let mut this = self.get_mut();
+ let this = self.get_mut();
loop {
return match &mut this.state {
StreamState::Accepted(stream) => poll_fn(Pin::new(stream), cx),
@@ -307,7 +307,7 @@ impl AsyncWrite for MaybeTlsIncomingStream<TcpStream> {
}
fn poll_shutdown(self: Pin<&mut Self>, cx: &mut Context) -> Poll<io::Result<()>> {
- let mut this = self.get_mut();
+ let this = self.get_mut();
match &mut this.state {
StreamState::Accepted(stream) => match Pin::new(stream).poll_shutdown(cx) {
Poll::Ready(Ok(())) => {