Skip to content

Commit 57a276e

Browse files
authored
Merge pull request #1814 from ids1024/advanced-text
Do not require `Copy` for text `StyleSheet::Style`
2 parents c31ab8e + 47016a3 commit 57a276e

2 files changed

Lines changed: 3 additions & 23 deletions

File tree

core/src/widget/text.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ where
153153
&self.content,
154154
self.size,
155155
self.font,
156-
theme.appearance(self.style),
156+
theme.appearance(self.style.clone()),
157157
self.horizontal_alignment,
158158
self.vertical_alignment,
159159
);
@@ -233,7 +233,7 @@ where
233233
horizontal_alignment: self.horizontal_alignment,
234234
vertical_alignment: self.vertical_alignment,
235235
font: self.font,
236-
style: self.style,
236+
style: self.style.clone(),
237237
}
238238
}
239239
}
@@ -261,7 +261,7 @@ where
261261
/// The style sheet of some text.
262262
pub trait StyleSheet {
263263
/// The supported style of the [`StyleSheet`].
264-
type Style: Default + Copy;
264+
type Style: Default + Clone;
265265

266266
/// Produces the [`Appearance`] of some text.
267267
fn appearance(&self, style: Self::Style) -> Appearance;

style/src/text.rs

Lines changed: 0 additions & 20 deletions
This file was deleted.

0 commit comments

Comments
 (0)