This commit is contained in:
Antonio Scandurra 2021-09-08 17:10:48 +02:00
parent 6c3551bff1
commit a3bbf71390

View file

@ -1,22 +1,24 @@
use crate::util::ResultExt; use crate::util::ResultExt;
use anyhow::{anyhow, Context, Result}; use anyhow::{anyhow, Context, Result};
use async_tungstenite::tungstenite::http::Request; use async_tungstenite::tungstenite::{
use async_tungstenite::tungstenite::{Error as WebSocketError, Message as WebSocketMessage}; http::Request, Error as WebSocketError, Message as WebSocketMessage,
};
use gpui::{AsyncAppContext, Entity, ModelContext, Task}; use gpui::{AsyncAppContext, Entity, ModelContext, Task};
use lazy_static::lazy_static; use lazy_static::lazy_static;
use parking_lot::RwLock; use parking_lot::RwLock;
use postage::prelude::Stream; use postage::{prelude::Stream, watch};
use postage::watch; use std::{
use std::any::TypeId; any::TypeId,
use std::collections::HashMap; collections::HashMap,
use std::sync::Weak; convert::TryFrom,
use std::time::{Duration, Instant}; future::Future,
use std::{convert::TryFrom, future::Future, sync::Arc}; sync::{Arc, Weak},
time::{Duration, Instant},
};
use surf::Url; use surf::Url;
use zrpc::proto::{AnyTypedEnvelope, EntityMessage};
pub use zrpc::{proto, ConnectionId, PeerId, TypedEnvelope}; pub use zrpc::{proto, ConnectionId, PeerId, TypedEnvelope};
use zrpc::{ use zrpc::{
proto::{EnvelopedMessage, RequestMessage}, proto::{AnyTypedEnvelope, EntityMessage, EnvelopedMessage, RequestMessage},
Peer, Receipt, Peer, Receipt,
}; };