Skip to content

Commit 5e4de7b

Browse files
committed
Use imported Color
1 parent 3655890 commit 5e4de7b

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

internal/core/textlayout/sharedparley.rs

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -806,7 +806,7 @@ enum Style {
806806
Code,
807807
Link,
808808
Underline,
809-
Color(crate::Color),
809+
Color(Color),
810810
}
811811

812812
#[derive(Debug, PartialEq)]
@@ -1011,7 +1011,7 @@ fn parse_markdown(string: &str) -> RichText<'_> {
10111011
.expect("invalid color value");
10121012

10131013
style_stack.push((
1014-
Style::Color(crate::Color::from_argb_encoded(value)),
1014+
Style::Color(Color::from_argb_encoded(value)),
10151015
rich_text.paragraphs.last().unwrap().text.len(),
10161016
));
10171017
}
@@ -1181,7 +1181,7 @@ new *line*
11811181
text: "hello world".into(),
11821182
formatting: std::vec![FormattedSpan {
11831183
range: 0..11,
1184-
style: Style::Color(crate::Color::from_rgb_u8(255, 0, 0))
1184+
style: Style::Color(Color::from_rgb_u8(255, 0, 0))
11851185
},],
11861186
links: std::vec![]
11871187
}]
@@ -1192,10 +1192,7 @@ new *line*
11921192
[RichTextParagraph {
11931193
text: "hello world".into(),
11941194
formatting: std::vec![
1195-
FormattedSpan {
1196-
range: 0..11,
1197-
style: Style::Color(crate::Color::from_rgb_u8(255, 0, 0))
1198-
},
1195+
FormattedSpan { range: 0..11, style: Style::Color(Color::from_rgb_u8(255, 0, 0)) },
11991196
FormattedSpan { range: 0..11, style: Style::Underline },
12001197
],
12011198
links: std::vec![]

0 commit comments

Comments
 (0)