TreeWalker WIP.

This commit is contained in:
Simon Boyé
2023-03-04 18:02:30 +01:00
parent 5cca1829ad
commit 956d2d337c
6 changed files with 110 additions and 113 deletions

View File

@@ -84,6 +84,9 @@ pub enum Error {
#[error("io error: {0}")]
IoError(#[from] std::io::Error),
#[error("non-unicode file name: '{0}'")]
NonUnicodeFileName(String),
#[error("{0}")]
UnknownError(String),
}

View File

@@ -57,6 +57,14 @@ impl FromStr for ObjectId {
}
}
impl Default for ObjectId {
fn default() -> Self {
return Self {
id: Arc::new(vec![]),
}
}
}
impl fmt::Display for ObjectId {
fn fmt(&self, f: &mut fmt::Formatter) -> std::result::Result<(), fmt::Error> {
write_hex(f, self.id.as_slice())