Skip to content

Commit 49ae504

Browse files
committed
CI: Fix build with MSRV
The life time extension doesn't seem to work yet with 1.88
1 parent c246d5c commit 49ae504

File tree

1 file changed

+13
-10
lines changed

1 file changed

+13
-10
lines changed

internal/core/textlayout/sharedparley.rs

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -134,17 +134,20 @@ fn layout(text: &str, scale_factor: ScaleFactor, options: LayoutOptions) -> Layo
134134

135135
let push_to_builder = |builder: &mut parley::RangedBuilder<_>| {
136136
if let Some(ref font_request) = options.font_request {
137-
let font_stack = if let Some(family) = &font_request.family {
138-
parley::style::FontStack::List(std::borrow::Cow::Borrowed(&[
139-
parley::style::FontFamily::Named(family.as_str().into()),
140-
parley::style::FontFamily::Generic(parley::fontique::GenericFamily::SystemUi),
141-
]))
137+
if let Some(family) = &font_request.family {
138+
builder.push_default(parley::style::FontStack::List(std::borrow::Cow::Borrowed(
139+
&[
140+
parley::style::FontFamily::Named(family.as_str().into()),
141+
parley::style::FontFamily::Generic(
142+
parley::fontique::GenericFamily::SystemUi,
143+
),
144+
],
145+
)));
142146
} else {
143-
parley::style::FontStack::Single(parley::style::FontFamily::Generic(
144-
parley::fontique::GenericFamily::SystemUi,
145-
))
146-
};
147-
builder.push_default(font_stack);
147+
builder.push_default(parley::style::FontStack::Single(
148+
parley::style::FontFamily::Generic(parley::fontique::GenericFamily::SystemUi),
149+
));
150+
}
148151
if let Some(weight) = font_request.weight {
149152
builder.push_default(parley::StyleProperty::FontWeight(
150153
parley::style::FontWeight::new(weight as f32),

0 commit comments

Comments
 (0)