From d0ec9ec790d47f021c8ae4d02c2a4c0d82dc9682 Mon Sep 17 00:00:00 2001 From: Alex Beregszaszi Date: Mon, 14 Jan 2019 01:39:44 +0000 Subject: [PATCH] Add ModuleError::NotFound --- libchisel/src/lib.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libchisel/src/lib.rs b/libchisel/src/lib.rs index 5a8cf28..2eae66d 100644 --- a/libchisel/src/lib.rs +++ b/libchisel/src/lib.rs @@ -18,6 +18,7 @@ use std::{error, fmt}; #[derive(Eq, PartialEq, Debug)] pub enum ModuleError { NotSupported, + NotFound, Custom(String), } @@ -58,6 +59,7 @@ impl fmt::Display for ModuleError { "{}", match self { ModuleError::NotSupported => "Method unsupported", + ModuleError::NotFound => "Not found", ModuleError::Custom(msg) => msg, } ) @@ -68,6 +70,7 @@ impl error::Error for ModuleError { fn description(&self) -> &str { match self { ModuleError::NotSupported => "Method unsupported", + ModuleError::NotFound => "Not found", ModuleError::Custom(msg) => msg, } }