Skip to content

Commit

Permalink
repository(doc): easy::object::errors (#164)
Browse files Browse the repository at this point in the history
  • Loading branch information
Byron committed Sep 13, 2021
1 parent 61793ff commit de004b3
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion git-repository/src/easy/object/errors.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
#![allow(missing_docs)]
///
pub mod find {

use crate::easy;

pub(crate) type OdbError = git_odb::compound::find::Error;

/// The error returned by [`ObjectAccessExt::try_find_object()`][easy::ext::ObjectAccessExt::try_find_object()].
#[derive(Debug, thiserror::Error)]
#[allow(missing_docs)]
pub enum Error {
#[error(transparent)]
Find(#[from] OdbError),
Expand All @@ -16,12 +17,15 @@ pub mod find {
BorrowRepo(#[from] easy::borrow::repo::Error),
}

///
pub mod existing {
use crate::easy;

pub(crate) type OdbError = git_odb::pack::find::existing::Error<git_odb::compound::find::Error>;

/// The error returned by [`ObjectAccessExt::find_object()`][easy::ext::ObjectAccessExt::find_object()].
#[derive(Debug, thiserror::Error)]
#[allow(missing_docs)]
pub enum Error {
#[error(transparent)]
FindExisting(#[from] OdbError),
Expand All @@ -33,10 +37,13 @@ pub mod find {
}
}

///
pub mod write {
use crate::easy;

/// The error returned by [`ObjectAccessExt::write_object()`][easy::ext::ObjectAccessExt::write_object()].
#[derive(Debug, thiserror::Error)]
#[allow(missing_docs)]
pub enum Error {
#[error(transparent)]
OdbWrite(#[from] git_odb::loose::write::Error),
Expand Down

0 comments on commit de004b3

Please sign in to comment.