mirror of
https://codeberg.org/Toasterson/ips.git
synced 2026-04-10 13:20:42 +00:00
- 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.
12 lines
354 B
Rust
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()))
|
|
}
|