mirror of
https://github.com/clap-rs/clap
synced 2024-12-15 23:32:32 +00:00
Remove needless fn main
from doc tests
This commit is contained in:
parent
928ded9d42
commit
47031213a2
3 changed files with 3 additions and 15 deletions
|
@ -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.
|
||||||
/// ```
|
/// ```
|
||||||
|
|
|
@ -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")]
|
||||||
|
|
|
@ -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> {
|
||||||
|
|
Loading…
Reference in a new issue