Remove barely used zstd dependency

This commit is contained in:
Sam Mohr 2024-08-16 10:01:37 -07:00
parent a14a110293
commit e169529ede
No known key found for this signature in database
GPG key ID: EA41D161A3C1BC99
10 changed files with 81 additions and 131 deletions

View file

@ -1,30 +1,45 @@
use snafu::{Backtrace, Snafu};
use crate::symbol::IdentId;
#[derive(Debug, Snafu)]
#[snafu(visibility(pub))]
#[derive(Debug)]
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,
},
#[snafu(display(
"IdentIdNotFound: I could not find IdentId {:?} in ident_ids {:?}.",
ident_id,
ident_ids_str
))]
IdentIdNotFound {
ident_id: IdentId,
ident_ids_str: String,
backtrace: Backtrace,
},
}
impl std::fmt::Display for ModuleError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match self {
Self::ModuleIdNotFound {
module_id,
all_ident_ids,
} => {
write!(
f,
"ModuleIdNotFound: I could not find the ModuleId {} in Interns.all_ident_ids: {}.",
module_id,
all_ident_ids
)
}
Self::IdentIdNotFound {
ident_id,
ident_ids_str,
} => {
write!(
f,
"IdentIdNotFound: I could not find IdentId {:?} in ident_ids {:?}.",
ident_id, ident_ids_str
)
}
}
}
}
impl std::error::Error for ModuleError {}
pub type ModuleResult<T, E = ModuleError> = std::result::Result<T, E>;