ips/pkg6depotd/src/http/server.rs
Till Wegmueller d2d1c297cc
Refactor to align with Rust formatting guidelines and enhance code readability.
- Adjusted indentation and line breaks for structs, functions, and method calls to comply with Rust formatting standards.
- Improved error message formatting and consistency across `PkgTreeError` instances.
- Restructured long function arguments and chained calls for clarity and maintainability.
- Simplified conditional statements and loops for better readability.
- No functional changes introduced.
2025-12-22 20:10:17 +01:00

12 lines
354 B
Rust

use crate::errors::Result;
use axum::Router;
use tokio::net::TcpListener;
pub async fn run(router: Router, listener: TcpListener) -> Result<()> {
let addr = listener.local_addr()?;
tracing::info!("Listening on {}", addr);
axum::serve(listener, router)
.await
.map_err(|e| crate::errors::DepotError::Server(e.to_string()))
}