Use once_cell to allow for global static immutable options
So they don't have to be passed around all over the place
This commit is contained in:
+1
-5
@@ -2,13 +2,9 @@ mod listener;
|
||||
mod options;
|
||||
mod server;
|
||||
|
||||
use structopt::StructOpt;
|
||||
|
||||
use crate::listener::Listener;
|
||||
use crate::options::Opt;
|
||||
|
||||
|
||||
fn main() -> std::io::Result<()> {
|
||||
let mut server = Listener::new(Opt::from_args())?;
|
||||
let mut server = Listener::new()?;
|
||||
server.run()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user