Skip to content

Commit b81d8ae

Browse files
committed
Fix into_{blob,tag} panic messages
1 parent 74631d4 commit b81d8ae

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

gix/src/object/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,8 @@ impl<'repo> Object<'repo> {
7777
/// Transform this object into a blob, or panic if it is none.
7878
pub fn into_blob(self) -> Blob<'repo> {
7979
match self.try_into() {
80-
Ok(tree) => tree,
81-
Err(this) => panic!("Tried to use {} as tree, but was {}", this.id, this.kind),
80+
Ok(blob) => blob,
81+
Err(this) => panic!("Tried to use {} as blob, but was {}", this.id, this.kind),
8282
}
8383
}
8484

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

0 commit comments

Comments
 (0)