libimagutil: Move from error-chain to failure

Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
This commit is contained in:
Matthias Beyer 2018-10-30 18:40:50 +01:00
parent c2f674cc29
commit 72add24d87

View file

@ -50,9 +50,9 @@ macro_rules! make_mock_app {
use clap::{App, ArgMatches}; use clap::{App, ArgMatches};
use libimagrt::spec::CliSpec; use libimagrt::spec::CliSpec;
use libimagrt::runtime::Runtime; use libimagrt::runtime::Runtime;
use libimagrt::error::RuntimeError;
use libimagrt::configuration::InternalConfiguration; use libimagrt::configuration::InternalConfiguration;
use toml::Value; use toml::Value;
use failure::Error;
#[derive(Clone)] #[derive(Clone)]
struct MockLinkApp<'a> { struct MockLinkApp<'a> {
@ -95,8 +95,8 @@ macro_rules! make_mock_app {
} }
#[allow(unused)] #[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>, Error> {
let mut cli_args = vec![$appname]; let mut cli_args = vec![$appname, "--rtp", "/tmp"];
cli_args.append(&mut args); cli_args.append(&mut args);
@ -106,7 +106,7 @@ macro_rules! make_mock_app {
#[allow(unused)] #[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>, Error>
{ {
let mut cli_args = vec![$appname, "--rtp", "/tmp"]; let mut cli_args = vec![$appname, "--rtp", "/tmp"];