diff options
Diffstat (limited to 'vendor/gix-pack/src/find.rs')
-rw-r--r-- | vendor/gix-pack/src/find.rs | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/vendor/gix-pack/src/find.rs b/vendor/gix-pack/src/find.rs index 2908669a2..b049d4d78 100644 --- a/vendor/gix-pack/src/find.rs +++ b/vendor/gix-pack/src/find.rs @@ -1,13 +1,16 @@ +/// The error returned by methods of the [Find](crate::Find) trait. +pub type Error = Box<dyn std::error::Error + Send + Sync + 'static>; + /// pub mod existing { use gix_hash::ObjectId; - /// The error returned by the [`find(…)`][crate::FindExt::find()] trait methods. + /// The error returned by the [`find(…)`](crate::FindExt::find()) trait methods. #[derive(Debug, thiserror::Error)] #[allow(missing_docs)] - pub enum Error<T: std::error::Error + 'static> { + pub enum Error { #[error(transparent)] - Find(T), + Find(crate::find::Error), #[error("An object with id {} could not be found", .oid)] NotFound { oid: ObjectId }, } @@ -17,12 +20,12 @@ pub mod existing { pub mod existing_object { use gix_hash::ObjectId; - /// The error returned by the various [`find_*`][crate::FindExt::find_commit()] trait methods. + /// The error returned by the various [`find_*`](crate::FindExt::find_commit()) trait methods. #[derive(Debug, thiserror::Error)] #[allow(missing_docs)] - pub enum Error<T: std::error::Error + 'static> { + pub enum Error { #[error(transparent)] - Find(T), + Find(crate::find::Error), #[error(transparent)] Decode(gix_object::decode::Error), #[error("An object with id {} could not be found", .oid)] @@ -36,12 +39,12 @@ pub mod existing_object { pub mod existing_iter { use gix_hash::ObjectId; - /// The error returned by the various [`find_*`][crate::FindExt::find_commit()] trait methods. + /// The error returned by the various [`find_*`](crate::FindExt::find_commit()) trait methods. #[derive(Debug, thiserror::Error)] #[allow(missing_docs)] - pub enum Error<T: std::error::Error + 'static> { + pub enum Error { #[error(transparent)] - Find(T), + Find(crate::find::Error), #[error("An object with id {} could not be found", .oid)] NotFound { oid: ObjectId }, #[error("Expected object of kind {} something else", .expected)] |