Skip to content

Commit

Permalink
Merge pull request #28 from Lurk/refactoring
Browse files Browse the repository at this point in the history
make clippy happy
  • Loading branch information
Lurk authored Oct 12, 2023
2 parents 09fe9c4 + f71c3f0 commit 1d0f329
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/nodes/list_item.rs
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,8 @@ impl Deserializer for ListItem {
};
let mut matcher = Matcher::new(input);
if let Some(list_item) = matcher.get_match(
format!("{}{} ", " ".repeat(level), list_type.clone()).as_str(),
format!("\n{}{} ", " ".repeat(level), list_type.clone()).as_str(),
format!("{}{} ", " ".repeat(level), list_type).as_str(),
format!("\n{}{} ", " ".repeat(level), list_type).as_str(),
true,
) {
let content_body = if list_item.end_token.is_empty() {
Expand Down
2 changes: 1 addition & 1 deletion src/nodes/metadata.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ impl Metadata {
timestamp,
image: image.map(|i| i.into()),
preview: preview.map(|p| p.into()),
tags: tags.unwrap_or(vec![]),
tags: tags.unwrap_or_default(),
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/nodes/yamd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ impl Yamd {

pub fn new_with_nodes(metadata: Option<Metadata>, nodes: Vec<YamdNodes>) -> Self {
Self {
metadata: metadata.unwrap_or(Metadata::default()),
metadata: metadata.unwrap_or_default(),
nodes,
}
}
Expand Down

0 comments on commit 1d0f329

Please sign in to comment.