Browse Source

Remove axum warnings

imbolc 3 năm trước cách đây
mục cha
commit
3415f0d105
1 tập tin đã thay đổi với 2 bổ sung2 xóa
  1. 2 2
      src/server/mod.rs

+ 2 - 2
src/server/mod.rs

@@ -3,7 +3,7 @@ use axum::{
     http::StatusCode,
     response::IntoResponse,
     routing::{get, get_service},
-    AddExtensionLayer, Router,
+    Router,
 };
 use notify::{RecommendedWatcher, Watcher};
 
@@ -88,7 +88,7 @@ pub async fn startup(config: CrateConfig) -> Result<()> {
                         },
                     ),
                 )
-                .layer(AddExtensionLayer::new(ws_reload_state))
+                .layer(Extension(ws_reload_state))
                 .into_make_service(),
         )
         .await?;