about summary refs log tree commit diff
path: root/tvix/nix-compat/src/wire/bytes/reader/mod.rs
diff options
context:
space:
mode:
authoredef <edef@edef.eu>2024-04-26T00·49+0000
committeredef <edef@edef.eu>2024-04-26T06·56+0000
commita39894c158a84cf0bc1068e3eb5b71309b4adbff (patch)
tree00ae2ba3f0203919857abd878993b31b6633130b /tvix/nix-compat/src/wire/bytes/reader/mod.rs
parent89316b22bc4eb2ecadc63e2129648d2282b55174 (diff)
refactor(nix-compat/wire/bytes/reader): drop Pin::get_mut r/8014
Pin<&mut T> is DerefMut when T: Unpin, so we don't actually need to
explicitly call get_mut.

Change-Id: Iaa312ec49c87100010e09c94f319e57e31da0cd5
Reviewed-on: https://cl.tvl.fyi/c/depot/+/11520
Tested-by: BuildkiteCI
Reviewed-by: flokli <flokli@flokli.de>
Diffstat (limited to 'tvix/nix-compat/src/wire/bytes/reader/mod.rs')
-rw-r--r--tvix/nix-compat/src/wire/bytes/reader/mod.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/tvix/nix-compat/src/wire/bytes/reader/mod.rs b/tvix/nix-compat/src/wire/bytes/reader/mod.rs
index 8d4eab78f370..3bc8fcf688c4 100644
--- a/tvix/nix-compat/src/wire/bytes/reader/mod.rs
+++ b/tvix/nix-compat/src/wire/bytes/reader/mod.rs
@@ -93,11 +93,11 @@ where
 
 impl<R: AsyncRead + Unpin> AsyncRead for BytesReader<R> {
     fn poll_read(
-        self: Pin<&mut Self>,
+        mut self: Pin<&mut Self>,
         cx: &mut task::Context,
         buf: &mut ReadBuf,
     ) -> Poll<io::Result<()>> {
-        let this = &mut self.get_mut().state;
+        let this = &mut self.state;
 
         loop {
             match this {