mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-14 15:56:13 +03:00
pkg/freetype: unknown errors should be reported, not unreachable
This commit is contained in:
@ -94,6 +94,7 @@ pub const Error = error{
|
|||||||
BbxTooBig,
|
BbxTooBig,
|
||||||
CorruptedFontHeader,
|
CorruptedFontHeader,
|
||||||
CorruptedFontGlyphs,
|
CorruptedFontGlyphs,
|
||||||
|
UnknownFreetypeError,
|
||||||
};
|
};
|
||||||
|
|
||||||
pub fn intToError(err: c_int) Error!void {
|
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_Bbx_Too_Big => Error.BbxTooBig,
|
||||||
c.FT_Err_Corrupted_Font_Header => Error.CorruptedFontHeader,
|
c.FT_Err_Corrupted_Font_Header => Error.CorruptedFontHeader,
|
||||||
c.FT_Err_Corrupted_Font_Glyphs => Error.CorruptedFontGlyphs,
|
c.FT_Err_Corrupted_Font_Glyphs => Error.CorruptedFontGlyphs,
|
||||||
else => unreachable,
|
else => Error.UnknownFreetypeError,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user