Merge pull request #373 from matthiasbeyer/libimagrt/err-kind-is-err-type

Rename: kind() to err_type()
This commit is contained in:
Matthias Beyer 2016-04-20 17:33:31 +02:00
commit 208003364e
2 changed files with 3 additions and 3 deletions

View File

@ -44,7 +44,7 @@ pub mod error {
/**
* get the Kind of the Error
*/
pub fn kind(&self) -> ConfigErrorKind {
pub fn err_type(&self) -> ConfigErrorKind {
self.kind.clone()
}
@ -52,7 +52,7 @@ pub mod error {
* Get the string, the ConfigError can be described with
*/
pub fn as_str(e: &ConfigError) -> &'static str {
match e.kind() {
match e.err_type() {
ConfigErrorKind::NoConfigFileFound => "No config file found",
}
}

View File

@ -74,7 +74,7 @@ impl<'a> Runtime<'a> {
let cfg = Configuration::new(&rtp);
let cfg = if cfg.is_err() {
let e = cfg.err().unwrap();
if e.kind() != ConfigErrorKind::NoConfigFileFound {
if e.err_type() != ConfigErrorKind::NoConfigFileFound {
let cause : Option<Box<Error>> = Some(Box::new(e));
return Err(RuntimeError::new(RuntimeErrorKind::Instantiate, cause));
} else {