chiark / gitweb /
Switch to deriving Deref
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Wed, 4 May 2022 20:50:15 +0000 (21:50 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Wed, 4 May 2022 20:52:41 +0000 (21:52 +0100)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
src/mgmtchannel.rs

index cb51d553e17af3de5bf2925ffae33bf1ad30d17d..880a0dceb08b8645928e8ba3fc5c48a4ed78db4f 100644 (file)
@@ -194,13 +194,12 @@ impl IoTryClone for UnixStream {
 }
 
 
-#[derive(Debug)]
+#[derive(Debug,Deref,DerefMut)]
 pub struct MgmtChannelForGame {
-  pub chan: ClientMgmtChannel,
+  #[deref] #[deref_mut] pub chan: ClientMgmtChannel,
   pub game: InstanceName,
   pub how: MgmtGameUpdateMode,
 }
-deref_to_field_mut!{MgmtChannelForGame, ClientMgmtChannel, chan}
 
 impl MgmtChannelForGame {
   #[throws(AE)]