mirror of
https://github.com/zed-industries/zed.git
synced 2025-01-27 04:44:30 +00:00
Make TypedEnvelope fields public
This commit is contained in:
parent
a3c938cc77
commit
2fd0f0be50
2 changed files with 4 additions and 14 deletions
|
@ -38,19 +38,9 @@ type MessageHandler = Box<
|
||||||
>;
|
>;
|
||||||
|
|
||||||
pub struct TypedEnvelope<T> {
|
pub struct TypedEnvelope<T> {
|
||||||
id: u32,
|
pub id: u32,
|
||||||
connection_id: ConnectionId,
|
pub connection_id: ConnectionId,
|
||||||
payload: T,
|
pub payload: T,
|
||||||
}
|
|
||||||
|
|
||||||
impl<T> TypedEnvelope<T> {
|
|
||||||
pub fn connection_id(&self) -> ConnectionId {
|
|
||||||
self.connection_id
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn payload(&self) -> &T {
|
|
||||||
&self.payload
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pub struct Peer {
|
pub struct Peer {
|
||||||
|
|
|
@ -113,7 +113,7 @@ async fn handle_open_buffer(
|
||||||
rpc: &Arc<Peer>,
|
rpc: &Arc<Peer>,
|
||||||
cx: &mut AsyncAppContext,
|
cx: &mut AsyncAppContext,
|
||||||
) -> anyhow::Result<()> {
|
) -> anyhow::Result<()> {
|
||||||
let payload = request.payload();
|
let payload = &request.payload;
|
||||||
dbg!(&payload.path);
|
dbg!(&payload.path);
|
||||||
rpc.respond(request, proto::OpenBufferResponse { buffer: None })
|
rpc.respond(request, proto::OpenBufferResponse { buffer: None })
|
||||||
.await?;
|
.await?;
|
||||||
|
|
Loading…
Reference in a new issue