diff --git a/src/nodes/list_item.rs b/src/nodes/list_item.rs index adf0da2..dc37cd9 100644 --- a/src/nodes/list_item.rs +++ b/src/nodes/list_item.rs @@ -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() { diff --git a/src/nodes/metadata.rs b/src/nodes/metadata.rs index 1b0048e..2bc90b4 100644 --- a/src/nodes/metadata.rs +++ b/src/nodes/metadata.rs @@ -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(), } } } diff --git a/src/nodes/yamd.rs b/src/nodes/yamd.rs index 13e2832..cadc36b 100644 --- a/src/nodes/yamd.rs +++ b/src/nodes/yamd.rs @@ -146,7 +146,7 @@ impl Yamd { pub fn new_with_nodes(metadata: Option, nodes: Vec) -> Self { Self { - metadata: metadata.unwrap_or(Metadata::default()), + metadata: metadata.unwrap_or_default(), nodes, } }