diff --git a/src/config.rs b/src/config.rs index c20bdd1..0587916 100644 --- a/src/config.rs +++ b/src/config.rs @@ -416,7 +416,7 @@ impl Config { } pub(crate) fn from_matches(matches: &ArgMatches) -> ConfigResult { - let invocation_directory = env::current_dir().context(config_error::CurrentDirSnafu)?; + let invocation_directory = env::current_dir().context(config_error::CurrentDirContext)?; let verbosity = if matches.is_present(arg::QUIET) { Verbosity::Quiet diff --git a/src/config_error.rs b/src/config_error.rs index ce4d3d7..af14c00 100644 --- a/src/config_error.rs +++ b/src/config_error.rs @@ -1,7 +1,7 @@ use crate::common::*; #[derive(Debug, Snafu)] -#[snafu(visibility(pub(crate)))] +#[snafu(visibility(pub(crate)), context(suffix(Context)))] pub(crate) enum ConfigError { #[snafu(display("Failed to get current directory: {}", source))] CurrentDir { source: io::Error },