mirror of
https://github.com/clap-rs/clap
synced 2024-12-14 06:42:33 +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
|
||||
/// ```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.
|
||||
/// ```
|
||||
|
|
|
@ -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")]
|
||||
|
|
|
@ -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> {
|
||||
|
|
Loading…
Reference in a new issue