chore: Clippy fixes for 1.80 (#13987)
The biggest hurdle turned out to be use of `Arc<Language>` in maps, as `clippy::mutable_key_type` started triggering on it (due to - I suppose - internal mutability on `HighlightMap`?). I switched over to using `LanguageId` as the key type in some of the callsites, as that's what `Language` uses anyways for it's hash/eq, though I've still had to suppress the lint outside of language crate. /cc @maxdeviant , le clippy guru. Release Notes: - N/A
This commit is contained in:
parent
d4ddc4c62c
commit
33a67ad6b9
8 changed files with 12 additions and 33 deletions
|
@ -658,26 +658,6 @@ impl Hash for RenderGlyphParams {
|
|||
}
|
||||
}
|
||||
|
||||
/// The parameters for rendering an emoji glyph.
|
||||
#[derive(Clone, Debug, PartialEq)]
|
||||
pub struct RenderEmojiParams {
|
||||
pub(crate) font_id: FontId,
|
||||
pub(crate) glyph_id: GlyphId,
|
||||
pub(crate) font_size: Pixels,
|
||||
pub(crate) scale_factor: f32,
|
||||
}
|
||||
|
||||
impl Eq for RenderEmojiParams {}
|
||||
|
||||
impl Hash for RenderEmojiParams {
|
||||
fn hash<H: Hasher>(&self, state: &mut H) {
|
||||
self.font_id.0.hash(state);
|
||||
self.glyph_id.0.hash(state);
|
||||
self.font_size.0.to_bits().hash(state);
|
||||
self.scale_factor.to_bits().hash(state);
|
||||
}
|
||||
}
|
||||
|
||||
/// The configuration details for identifying a specific font.
|
||||
#[derive(Clone, Debug, Eq, PartialEq, Hash)]
|
||||
pub struct Font {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue