diff --git a/zed-rpc/src/peer.rs b/zed-rpc/src/peer.rs index 230af4c60e..51c5d00737 100644 --- a/zed-rpc/src/peer.rs +++ b/zed-rpc/src/peer.rs @@ -38,19 +38,9 @@ type MessageHandler = Box< >; pub struct TypedEnvelope { - id: u32, - connection_id: ConnectionId, - payload: T, -} - -impl TypedEnvelope { - pub fn connection_id(&self) -> ConnectionId { - self.connection_id - } - - pub fn payload(&self) -> &T { - &self.payload - } + pub id: u32, + pub connection_id: ConnectionId, + pub payload: T, } pub struct Peer { diff --git a/zed/src/workspace.rs b/zed/src/workspace.rs index ac65daec85..b2ea568f38 100644 --- a/zed/src/workspace.rs +++ b/zed/src/workspace.rs @@ -113,7 +113,7 @@ async fn handle_open_buffer( rpc: &Arc, cx: &mut AsyncAppContext, ) -> anyhow::Result<()> { - let payload = request.payload(); + let payload = &request.payload; dbg!(&payload.path); rpc.respond(request, proto::OpenBufferResponse { buffer: None }) .await?;