Fix Opt::parse_args doc typo

This commit is contained in:
Allan 2024-08-23 11:24:38 -04:00
parent d425379ae3
commit 9a934bc8ba
2 changed files with 2 additions and 2 deletions

View file

@ -118,7 +118,7 @@ impl Default for ServerConf {
/// Command-line options /// Command-line options
/// ///
/// Call `Opt::from_args()` to build this object from the process's command line arguments. /// Call `Opt::parse_args()` to build this object from the process's command line arguments.
#[derive(Parser, Debug, Default)] #[derive(Parser, Debug, Default)]
#[clap(name = "basic", long_about = None)] #[clap(name = "basic", long_about = None)]
pub struct Opt { pub struct Opt {

View file

@ -201,7 +201,7 @@ impl Server {
/// independent services. /// independent services.
/// ///
/// Command line options can either be passed by parsing the command line arguments via /// Command line options can either be passed by parsing the command line arguments via
/// `Opt::from_args()`, or be generated by other means. /// `Opt::parse_args()`, or be generated by other means.
pub fn new(opt: impl Into<Option<Opt>>) -> Result<Server> { pub fn new(opt: impl Into<Option<Opt>>) -> Result<Server> {
let opt = opt.into(); let opt = opt.into();
let (tx, rx) = watch::channel(false); let (tx, rx) = watch::channel(false);