Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)

vector: compatibility with rust 1.71

authored by Theodore Ni and committed by Yt 33916d23 ad566c44

+26
+4
pkgs/tools/misc/vector/default.nix
··· 45 45 hash = "sha256-+ATOHx+LQLQV4nMdj1FRRvDTqGCTbX9kl290AbY9Vw0="; 46 46 }; 47 47 48 + patches = [ 49 + ./rust-1.71-unnecessary-mut.diff 50 + ]; 51 + 48 52 cargoLock = { 49 53 lockFile = ./Cargo.lock; 50 54 outputHashes = {
+22
pkgs/tools/misc/vector/rust-1.71-unnecessary-mut.diff
··· 1 + diff --git a/lib/vector-core/src/tls/incoming.rs b/lib/vector-core/src/tls/incoming.rs 2 + index 5d2fd1cdb..7992f2c2b 100644 3 + --- a/lib/vector-core/src/tls/incoming.rs 4 + +++ b/lib/vector-core/src/tls/incoming.rs 5 + @@ -263,7 +263,7 @@ impl MaybeTlsIncomingStream<TcpStream> { 6 + where 7 + F: FnOnce(Pin<&mut MaybeTlsStream<TcpStream>>, &mut Context) -> Poll<io::Result<T>>, 8 + { 9 + - let mut this = self.get_mut(); 10 + + let this = self.get_mut(); 11 + loop { 12 + return match &mut this.state { 13 + StreamState::Accepted(stream) => poll_fn(Pin::new(stream), cx), 14 + @@ -307,7 +307,7 @@ impl AsyncWrite for MaybeTlsIncomingStream<TcpStream> { 15 + } 16 + 17 + fn poll_shutdown(self: Pin<&mut Self>, cx: &mut Context) -> Poll<io::Result<()>> { 18 + - let mut this = self.get_mut(); 19 + + let this = self.get_mut(); 20 + match &mut this.state { 21 + StreamState::Accepted(stream) => match Pin::new(stream).poll_shutdown(cx) { 22 + Poll::Ready(Ok(())) => {