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
/// ```ignore
/// # #[macro_use]
/// # extern crate clap;
/// # use clap::App;
/// # fn main() {
/// # use clap::{App, load_yaml};
/// let yml = load_yaml!("app.yml");
/// let app = App::from_yaml(yml)
/// .name(crate_name!());
/// # }
///
/// // continued logic goes here, such as `app.get_matches()` etc.
/// ```

View file

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

View file

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