Add derive traits only if derive feature is enabled

This commit is contained in:
Pavan Kumar Sunkara 2020-08-11 16:30:02 +02:00
parent 9b22f19995
commit 5c0947f160

View file

@ -23,11 +23,13 @@ compile_error!("`std` feature is currently required to build `clap`");
pub use crate::{
build::{App, AppSettings, Arg, ArgGroup, ArgSettings, ValueHint},
derive::{ArgEnum, Clap, FromArgMatches, IntoApp, Subcommand},
parse::errors::{Error, ErrorKind, Result},
parse::{ArgMatches, Indices, OsValues, Values},
};
#[cfg(feature = "derive")]
pub use crate::derive::{ArgEnum, Clap, FromArgMatches, IntoApp, Subcommand};
#[cfg(feature = "yaml")]
#[cfg_attr(feature = "yaml", doc(hidden))]
pub use yaml_rust::YamlLoader;
@ -44,6 +46,7 @@ pub use lazy_static;
#[allow(missing_docs)]
mod macros;
#[cfg(feature = "derive")]
mod derive;
mod build;