summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--examples/markdown/src/main.rs4
-rw-r--r--widget/src/markdown.rs8
2 files changed, 6 insertions, 6 deletions
diff --git a/examples/markdown/src/main.rs b/examples/markdown/src/main.rs
index efe5b324..173cb389 100644
--- a/examples/markdown/src/main.rs
+++ b/examples/markdown/src/main.rs
@@ -28,7 +28,7 @@ impl Markdown {
(
Self {
content: text_editor::Content::with_text(INITIAL_CONTENT),
- items: markdown::parse(INITIAL_CONTENT, &theme.palette())
+ items: markdown::parse(INITIAL_CONTENT, theme.palette())
.collect(),
theme,
},
@@ -46,7 +46,7 @@ impl Markdown {
if is_edit {
self.items = markdown::parse(
&self.content.text(),
- &self.theme.palette(),
+ self.theme.palette(),
)
.collect();
}
diff --git a/widget/src/markdown.rs b/widget/src/markdown.rs
index c5eeaea9..9cd4a62f 100644
--- a/widget/src/markdown.rs
+++ b/widget/src/markdown.rs
@@ -35,10 +35,10 @@ pub enum Item {
}
/// Parse the given Markdown content.
-pub fn parse<'a>(
- markdown: &'a str,
- palette: &'a theme::Palette,
-) -> impl Iterator<Item = Item> + 'a {
+pub fn parse(
+ markdown: &str,
+ palette: theme::Palette,
+) -> impl Iterator<Item = Item> + '_ {
struct List {
start: Option<u64>,
items: Vec<Vec<Item>>,