mirror of
https://github.com/neon-mmd/websurfx.git
synced 2024-11-22 14:08:23 -05:00
🚨 fix(build): make the cargo build check happy (#486)
This commit is contained in:
parent
ee4322e95e
commit
0adbaecc07
12
src/lib.rs
12
src/lib.rs
@ -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(
|
||||
|
Loading…
Reference in New Issue
Block a user