Merge pull request #1050 from matthiasbeyer/unused-fns-in-macro

Allow generated fns from macros to be unused
This commit is contained in:
Matthias Beyer 2017-09-04 09:17:00 +02:00 committed by GitHub
commit acb4df5033

View file

@ -95,11 +95,13 @@ macro_rules! make_mock_app {
}
}
#[allow(unused)]
pub fn generate_minimal_test_config() -> Option<Configuration> { ::toml::de::from_str("[store]\nimplicit-create=true")
.map(Configuration::with_value)
.ok()
}
#[allow(unused)]
pub fn generate_test_runtime<'a>(mut args: Vec<&'static str>) -> Result<Runtime<'a>, RuntimeError> {
let mut cli_args = vec![$appname, "--rtp", "/tmp"];
@ -109,6 +111,7 @@ macro_rules! make_mock_app {
Runtime::with_configuration(cli_app, generate_minimal_test_config())
}
#[allow(unused)]
pub fn reset_test_runtime<'a>(mut args: Vec<&'static str>, old_runtime: Runtime)
-> Result<Runtime<'a>, RuntimeError>
{