This PR simplifies the Server::new function interface by allowing direct passing of Opt or None without the need to wrap with Some. This enhancement makes the API more ergonomic and user-friendly.
Changes:
Before: Required to wrap Opt with Some.
let my_server = Server::new(Some(Opt::from_args())).unwrap();
After: Direct passing of Opt or None.
let my_server = Server::new(Opt::from_args()).unwrap();
let my_server = Server::new(None).unwrap();
// The previous method of wrapping `Opt` with `Some` is still supported.
let my_server = Server::new(Some(Opt::from_args())).unwrap();
This update streamlines function calls, improving the overall developer experience.
This PR simplifies the
Server::new
function interface by allowing direct passing ofOpt
orNone
without the need to wrap withSome
. This enhancement makes the API more ergonomic and user-friendly.Changes:
Opt
withSome
.Opt
orNone
.This update streamlines function calls, improving the overall developer experience.