0
0
mirror of https://github.com/neon-mmd/websurfx.git synced 2024-11-26 15:58:21 -05:00

🚨 fix(build): make the cargo build check happy (#486)

This commit is contained in:
neon_arch 2024-03-07 21:09:24 +03:00
parent ee4322e95e
commit 0adbaecc07

View File

@ -47,15 +47,19 @@ static SHARED_CACHE: OnceLock<SharedCache> = OnceLock::new();
/// # Example
///
/// ```rust
/// use std::net::TcpListener;
/// use std::{net::TcpListener, sync::OnceLock};
/// use websurfx::{config::parser::Config, run, cache::cacher::create_cache};
///
/// /// A static constant for holding the parsed config.
/// static CONFIG: OnceLock<Config> = OnceLock::new();
///
/// #[tokio::main]
/// async fn main(){
/// let config = Config::parse(true).unwrap();
/// // Initialize the parsed config globally.
/// let config = CONFIG.get_or_init(|| Config::parse(true).unwrap());
/// let listener = TcpListener::bind("127.0.0.1:8080").expect("Failed to bind address");
/// let cache = create_cache(&config).await;
/// let server = run(listener,config,cache).expect("Failed to start server");
/// let cache = create_cache(config).await;
/// let server = run(listener,&config,cache).expect("Failed to start server");
/// }
/// ```
pub fn run(