Skip to content

Commit 92cbb13

Browse files
bnbeckwithByron
authored andcommitted
Update error message for type name
This change updates the error message in the `expect` call to display the correct message. If the `from_utf8` fails to unwrap it will be the result of _invalid_ utf8.
1 parent 3539531 commit 92cbb13

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

git-object/src/types.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ impl Kind {
9191

9292
impl fmt::Display for Kind {
9393
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
94-
f.write_str(std::str::from_utf8(self.to_bytes()).expect("valid utf8 in kind name"))
94+
f.write_str(std::str::from_utf8(self.to_bytes()).expect("invalid utf8 in kind name"))
9595
}
9696
}
9797

0 commit comments

Comments
 (0)