Remove needless fn main from doc tests

This commit is contained in:
Alex van de Sandt 2020-02-03 12:31:24 -05:00
parent 928ded9d42
commit 47031213a2
3 changed files with 3 additions and 15 deletions

View file

@ -251,14 +251,10 @@ impl<'b> App<'b> {
/// ///
/// # Examples /// # Examples
/// ```ignore /// ```ignore
/// # #[macro_use] /// # use clap::{App, load_yaml};
/// # extern crate clap;
/// # use clap::App;
/// # fn main() {
/// let yml = load_yaml!("app.yml"); /// let yml = load_yaml!("app.yml");
/// let app = App::from_yaml(yml) /// let app = App::from_yaml(yml)
/// .name(crate_name!()); /// .name(crate_name!());
/// # }
/// ///
/// // continued logic goes here, such as `app.get_matches()` etc. /// // continued logic goes here, such as `app.get_matches()` etc.
/// ``` /// ```

View file

@ -162,13 +162,9 @@ impl<'help> Arg<'help> {
/// # Examples /// # Examples
/// ///
/// ```ignore /// ```ignore
/// # #[macro_use] /// use clap::{Arg, load_yaml};
/// # extern crate clap;
/// # use clap::Arg;
/// # fn main() {
/// let yml = load_yaml!("arg.yml"); /// let yml = load_yaml!("arg.yml");
/// let arg = Arg::from_yaml(yml); /// let arg = Arg::from_yaml(yml);
/// # }
/// ``` /// ```
/// [`Arg`]: ./struct.Arg.html /// [`Arg`]: ./struct.Arg.html
#[cfg(feature = "yaml")] #[cfg(feature = "yaml")]

View file

@ -133,13 +133,9 @@ impl<'a> ArgGroup<'a> {
/// # Examples /// # Examples
/// ///
/// ```ignore /// ```ignore
/// # #[macro_use] /// # use clap::{ArgGroup, load_yaml};
/// # extern crate clap;
/// # use clap::ArgGroup;
/// # fn main() {
/// let yml = load_yaml!("group.yml"); /// let yml = load_yaml!("group.yml");
/// let ag = ArgGroup::from_yaml(yml); /// let ag = ArgGroup::from_yaml(yml);
/// # }
/// ``` /// ```
#[cfg(feature = "yaml")] #[cfg(feature = "yaml")]
pub fn from_yaml(y: &'a yaml_rust::Yaml) -> ArgGroup<'a> { pub fn from_yaml(y: &'a yaml_rust::Yaml) -> ArgGroup<'a> {