cleanup unwrap

This commit is contained in:
Anton-4 2021-10-15 19:01:41 +02:00
parent d3f2b95f7a
commit e003725f21
13 changed files with 110 additions and 55 deletions

View file

@ -0,0 +1,18 @@
use snafu::{Backtrace, Snafu};
#[derive(Debug, Snafu)]
#[snafu(visibility(pub))]
pub enum ModuleError {
#[snafu(display(
"ModuleIdNotFound: I could not find the ModuleId {} in Interns.all_ident_ids: {}.",
module_id,
all_ident_ids
))]
ModuleIdNotFound {
module_id: String,
all_ident_ids: String,
backtrace: Backtrace,
},
}
pub type ModuleResult<T, E = ModuleError> = std::result::Result<T, E>;