mirror of
https://github.com/typst/typst
synced 2025-08-15 15:38:33 +08:00
Fix clippy
This commit is contained in:
parent
0d2f442c35
commit
27c5e0081a
@ -398,7 +398,7 @@ fn finish(
|
|||||||
}
|
}
|
||||||
ValidationError::ContainsNotDefGlyph(f, loc, text) => {
|
ValidationError::ContainsNotDefGlyph(f, loc, text) => {
|
||||||
let span = get_span(*loc);
|
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 \
|
error!(span, "{prefix} the text '{text}' cannot be displayed \
|
||||||
using {font_str}";
|
using {font_str}";
|
||||||
|
@ -186,7 +186,7 @@ fn convert_gradient(
|
|||||||
))
|
))
|
||||||
.to_krilla(),
|
.to_krilla(),
|
||||||
spread_method: SpreadMethod::Pad,
|
spread_method: SpreadMethod::Pad,
|
||||||
stops: stops.into(),
|
stops,
|
||||||
anti_alias: gradient.anti_alias(),
|
anti_alias: gradient.anti_alias(),
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -207,7 +207,7 @@ fn convert_gradient(
|
|||||||
))
|
))
|
||||||
.to_krilla(),
|
.to_krilla(),
|
||||||
spread_method: SpreadMethod::Pad,
|
spread_method: SpreadMethod::Pad,
|
||||||
stops: stops.into(),
|
stops,
|
||||||
anti_alias: gradient.anti_alias(),
|
anti_alias: gradient.anti_alias(),
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -240,7 +240,7 @@ fn convert_gradient(
|
|||||||
end_angle: 360.0,
|
end_angle: 360.0,
|
||||||
transform: actual_transform.to_krilla(),
|
transform: actual_transform.to_krilla(),
|
||||||
spread_method: SpreadMethod::Pad,
|
spread_method: SpreadMethod::Pad,
|
||||||
stops: stops.into(),
|
stops,
|
||||||
anti_alias: gradient.anti_alias(),
|
anti_alias: gradient.anti_alias(),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -98,7 +98,7 @@ impl AbsExt for Abs {
|
|||||||
/// Display the font family of a font.
|
/// Display the font family of a font.
|
||||||
pub(crate) fn display_font(font: &Font) -> String {
|
pub(crate) fn display_font(font: &Font) -> String {
|
||||||
let font_family = &font.info().family;
|
let font_family = &font.info().family;
|
||||||
format!("{font_family}")
|
font_family.to_string()
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Convert a typst path to a krilla path.
|
/// Convert a typst path to a krilla path.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user