Allow generated fns from macros to be unused
This commit is contained in:
parent
c870a0a240
commit
eefcfd02dc
1 changed files with 3 additions and 0 deletions
|
@ -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")
|
pub fn generate_minimal_test_config() -> Option<Configuration> { ::toml::de::from_str("[store]\nimplicit-create=true")
|
||||||
.map(Configuration::with_value)
|
.map(Configuration::with_value)
|
||||||
.ok()
|
.ok()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(unused)]
|
||||||
pub fn generate_test_runtime<'a>(mut args: Vec<&'static str>) -> Result<Runtime<'a>, RuntimeError> {
|
pub fn generate_test_runtime<'a>(mut args: Vec<&'static str>) -> Result<Runtime<'a>, RuntimeError> {
|
||||||
let mut cli_args = vec![$appname, "--rtp", "/tmp"];
|
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())
|
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)
|
pub fn reset_test_runtime<'a>(mut args: Vec<&'static str>, old_runtime: Runtime)
|
||||||
-> Result<Runtime<'a>, RuntimeError>
|
-> Result<Runtime<'a>, RuntimeError>
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue