From f0a0e4df50a024a89571c3b56da59816583208db Mon Sep 17 00:00:00 2001 From: messense Date: Fri, 8 Jan 2016 20:26:29 +0800 Subject: [PATCH] docs(App) Fix App.print_help documentation --- src/app/mod.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/app/mod.rs b/src/app/mod.rs index dd1ef383..1c420826 100644 --- a/src/app/mod.rs +++ b/src/app/mod.rs @@ -1122,9 +1122,8 @@ impl<'a, 'v, 'ab, 'u, 'h, 'ar> App<'a, 'v, 'ab, 'u, 'h, 'ar> { /// ```no_run /// # use clap::App; /// # use std::io; - /// let mut app = App::new("myprog"); - /// let mut out = io::stdout(); - /// app.write_help(&mut out).ok().expect("failed to write to stdout"); + /// let app = App::new("myprog"); + /// app.print_help(); /// ``` pub fn print_help(&self) -> ClapResult<()> { let out = io::stdout();