fixed cargo check issue
This commit is contained in:
1 parent
00e5ffb122
commit
4b3d200c0d
2 files changed
+3
-5
No files matched your search
@@ -9,7 +9,6 @@ use tokio::sync::mpsc;
|
||||
use tokio_stream::wrappers::UnboundedReceiverStream;
|
||||
use tokio_util::task::LocalPoolHandle;
|
||||
|
||||
#[cfg(feature = "axum")]
|
||||
impl crate::Liveview {
|
||||
pub async fn upgrade(&self, ws: WebSocket, app: fn(Scope) -> Element) {
|
||||
connect(ws, self.pool.clone(), app, ()).await;
|
||||
|
||||
@@ -6,20 +6,19 @@ use tokio_stream::wrappers::UnboundedReceiverStream;
|
||||
use tokio_util::task::LocalPoolHandle;
|
||||
use warp::ws::{Message, WebSocket};
|
||||
|
||||
#[cfg(feature = "warp")]
|
||||
impl crate::Liveview {
|
||||
pub async fn upgrade(&self, ws: warp::ws::WebSocket, app: fn(Scope) -> Element) {
|
||||
connect(ws, self.pool.clone(), app, ()).await;
|
||||
}
|
||||
pub async fn upgrade_with_props<T>(&self, ws: warp::ws::WebSocket, app: fn(Scope) -> Element, props: T)
|
||||
pub async fn upgrade_with_props<T>(&self, ws: warp::ws::WebSocket, app: fn(Scope<T>) -> Element, props: T)
|
||||
where
|
||||
T: Send + Sync + 'static
|
||||
{
|
||||
connect(ws, self.pool.clone(), app, props)
|
||||
connect(ws, self.pool.clone(), app, props).await;
|
||||
}
|
||||
}
|
||||
|
||||
pub async fn connect<T>(ws: WebSocket, pool: LocalPoolHandle, app: fn(Scope) -> Element, props: T)
|
||||
pub async fn connect<T>(ws: WebSocket, pool: LocalPoolHandle, app: fn(Scope<T>) -> Element, props: T)
|
||||
where
|
||||
T: Send + Sync+ 'static
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user