refactor: rename HttpApiService.serve() to HttpApiService.run()
This commit is contained in:
+1
-1
@@ -71,5 +71,5 @@ async fn main(spawner: Spawner) -> ! {
|
|||||||
|
|
||||||
#[embassy_executor::task]
|
#[embassy_executor::task]
|
||||||
async fn http_api_serve_task(mut service: HttpApiService<'static, HttpApiProps>) {
|
async fn http_api_serve_task(mut service: HttpApiService<'static, HttpApiProps>) {
|
||||||
service.serve().await;
|
service.run().await;
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-2
@@ -28,7 +28,7 @@ impl Default for HttpApiConfig {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pub struct HttpApiService<'a, AB: AppBuilder> {
|
pub struct HttpApiService<'a, AB: AppBuilder> {
|
||||||
pub config: HttpApiConfig,
|
config: HttpApiConfig,
|
||||||
|
|
||||||
net_stack: Stack<'a>,
|
net_stack: Stack<'a>,
|
||||||
app: AppRouter<AB>,
|
app: AppRouter<AB>,
|
||||||
@@ -52,7 +52,7 @@ impl<'a, AB: AppBuilder> HttpApiService<'a, AB> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub async fn serve(&mut self) {
|
pub async fn run(&mut self) {
|
||||||
picoserve::Server::new(
|
picoserve::Server::new(
|
||||||
&self.app,
|
&self.app,
|
||||||
&self.config.web_serve_config,
|
&self.config.web_serve_config,
|
||||||
|
|||||||
Reference in New Issue
Block a user