
# Objective - Remove `derive_more`'s error derivation and replace it with `thiserror` ## Solution - Added `derive_more`'s `error` feature to `deny.toml` to prevent it sneaking back in. - Reverted to `thiserror` error derivation ## Notes Merge conflicts were too numerous to revert the individual changes, so this reversion was done manually. Please scrutinise carefully during review.
18 lines
662 B
Rust
18 lines
662 B
Rust
use cosmic_text::CacheKey;
|
|
use thiserror::Error;
|
|
|
|
#[derive(Debug, PartialEq, Eq, Error)]
|
|
/// Errors related to the textsystem
|
|
pub enum TextError {
|
|
/// Font was not found, this could be that the font has not yet been loaded, or
|
|
/// that the font failed to load for some other reason
|
|
#[error("font not found")]
|
|
NoSuchFont,
|
|
/// Failed to add glyph to a newly created atlas for some reason
|
|
#[error("failed to add glyph to newly-created atlas {0:?}")]
|
|
FailedToAddGlyph(u16),
|
|
/// Failed to get scaled glyph image for cache key
|
|
#[error("failed to get scaled glyph image for cache key: {0:?}")]
|
|
FailedToGetGlyphImage(CacheKey),
|
|
}
|