mirror of
https://github.com/huggingface/candle.git
synced 2025-06-17 11:08:52 +00:00
Sketch the candle-transformers crate. (#147)
* Sketch the candle-transformers crate. * Format the empty files.
This commit is contained in:
@ -157,6 +157,15 @@ pub enum Error {
|
||||
|
||||
#[error("unsupported safetensor dtype {0:?}")]
|
||||
UnsupportedSafeTensorDtype(safetensors::Dtype),
|
||||
|
||||
#[error(transparent)]
|
||||
Wrapped(Box<dyn std::error::Error + Send + Sync>),
|
||||
}
|
||||
|
||||
pub type Result<T> = std::result::Result<T, Error>;
|
||||
|
||||
impl Error {
|
||||
pub fn wrap(err: impl std::error::Error + Send + Sync + 'static) -> Self {
|
||||
Self::Wrapped(Box::new(err))
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user