Fix clippy

This commit is contained in:
Laurenz Stampfl 2025-03-18 16:54:33 +01:00
parent 0d2f442c35
commit 27c5e0081a
3 changed files with 5 additions and 5 deletions

View File

@ -398,7 +398,7 @@ fn finish(
}
ValidationError::ContainsNotDefGlyph(f, loc, text) => {
let span = get_span(*loc);
let font_str = display_font(gc.fonts_backward.get(&f).unwrap());
let font_str = display_font(gc.fonts_backward.get(f).unwrap());
error!(span, "{prefix} the text '{text}' cannot be displayed \
using {font_str}";

View File

@ -186,7 +186,7 @@ fn convert_gradient(
))
.to_krilla(),
spread_method: SpreadMethod::Pad,
stops: stops.into(),
stops,
anti_alias: gradient.anti_alias(),
};
@ -207,7 +207,7 @@ fn convert_gradient(
))
.to_krilla(),
spread_method: SpreadMethod::Pad,
stops: stops.into(),
stops,
anti_alias: gradient.anti_alias(),
};
@ -240,7 +240,7 @@ fn convert_gradient(
end_angle: 360.0,
transform: actual_transform.to_krilla(),
spread_method: SpreadMethod::Pad,
stops: stops.into(),
stops,
anti_alias: gradient.anti_alias(),
};

View File

@ -98,7 +98,7 @@ impl AbsExt for Abs {
/// Display the font family of a font.
pub(crate) fn display_font(font: &Font) -> String {
let font_family = &font.info().family;
format!("{font_family}")
font_family.to_string()
}
/// Convert a typst path to a krilla path.