mirror of
https://github.com/ghostty-org/ghostty.git
synced 2026-04-18 05:20:29 +00:00
pkg/freetype: unknown errors should be reported, not unreachable
This commit is contained in:
@@ -94,6 +94,7 @@ pub const Error = error{
|
||||
BbxTooBig,
|
||||
CorruptedFontHeader,
|
||||
CorruptedFontGlyphs,
|
||||
UnknownFreetypeError,
|
||||
};
|
||||
|
||||
pub fn intToError(err: c_int) Error!void {
|
||||
@@ -188,7 +189,7 @@ pub fn intToError(err: c_int) Error!void {
|
||||
c.FT_Err_Bbx_Too_Big => Error.BbxTooBig,
|
||||
c.FT_Err_Corrupted_Font_Header => Error.CorruptedFontHeader,
|
||||
c.FT_Err_Corrupted_Font_Glyphs => Error.CorruptedFontGlyphs,
|
||||
else => unreachable,
|
||||
else => Error.UnknownFreetypeError,
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user