Skip to content

Commit

Permalink
Fix into_{blob,tag} panic messages
Browse files Browse the repository at this point in the history
  • Loading branch information
caio committed Feb 13, 2024
1 parent 74631d4 commit b81d8ae
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions gix/src/object/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@ impl<'repo> Object<'repo> {
/// Transform this object into a blob, or panic if it is none.
pub fn into_blob(self) -> Blob<'repo> {
match self.try_into() {
Ok(tree) => tree,
Err(this) => panic!("Tried to use {} as tree, but was {}", this.id, this.kind),
Ok(blob) => blob,
Err(this) => panic!("Tried to use {} as blob, but was {}", this.id, this.kind),
}
}

Expand All @@ -102,7 +102,7 @@ impl<'repo> Object<'repo> {
pub fn into_tag(self) -> Tag<'repo> {
match self.try_into() {
Ok(tag) => tag,
Err(this) => panic!("Tried to use {} as commit, but was {}", this.id, this.kind),
Err(this) => panic!("Tried to use {} as tag, but was {}", this.id, this.kind),
}
}

Expand Down

0 comments on commit b81d8ae

Please sign in to comment.