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:
Barry Pederson
2022-03-01 10:03:38 -08:00
parent a244e714ea
commit b9c091f71f
6 changed files with 27 additions and 23 deletions
+1 -5
View File
@@ -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()
}