about summary refs log tree commit diff
path: root/tvix/nix-compat/src/wire/bytes/reader/trailer.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/trailer.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/trailer.rs')
-rw-r--r--tvix/nix-compat/src/wire/bytes/reader/trailer.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/tvix/nix-compat/src/wire/bytes/reader/trailer.rs b/tvix/nix-compat/src/wire/bytes/reader/trailer.rs
index d2b867c2c338..1a084d0eeb01 100644
--- a/tvix/nix-compat/src/wire/bytes/reader/trailer.rs
+++ b/tvix/nix-compat/src/wire/bytes/reader/trailer.rs
@@ -39,11 +39,11 @@ impl<R: AsyncRead + Unpin> TrailerReader<R> {
 
 impl<R: AsyncRead + Unpin> AsyncRead for TrailerReader<R> {
     fn poll_read(
-        self: Pin<&mut Self>,
+        mut self: Pin<&mut Self>,
         cx: &mut task::Context,
         user_buf: &mut ReadBuf,
     ) -> Poll<io::Result<()>> {
-        let this = self.get_mut();
+        let this = &mut *self;
 
         loop {
             match this {