From 938b3ac24463ab7533ff7b916b958f2d29b02ab1 Mon Sep 17 00:00:00 2001 From: Simon Laux Date: Wed, 29 May 2024 15:56:44 +0200 Subject: [PATCH] Apply suggestions from code review Co-authored-by: Farooq Karimi Zadeh --- src/parser/parse_from_text/desktop_subset.rs | 2 +- .../parse_from_text/markdown_elements/label_elements.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/parser/parse_from_text/desktop_subset.rs b/src/parser/parse_from_text/desktop_subset.rs index ccfd2b1..9e4d344 100644 --- a/src/parser/parse_from_text/desktop_subset.rs +++ b/src/parser/parse_from_text/desktop_subset.rs @@ -16,7 +16,7 @@ use super::Element; // [labeled](https://link) pub(crate) fn labeled_link(input: &str) -> IResult<&str, Element, CustomError<&str>> { - let (input, raw_label): (&str, &str) = delimited(tag("["), is_not("]"), tag("]"))(input)?; + let (input, raw_label) = delimited(tag("["), is_not("]"), tag("]"))(input)?; if raw_label.is_empty() { return Err(nom::Err::Error(CustomError::NoContent)); } diff --git a/src/parser/parse_from_text/markdown_elements/label_elements.rs b/src/parser/parse_from_text/markdown_elements/label_elements.rs index ea15de9..a5ab59d 100644 --- a/src/parser/parse_from_text/markdown_elements/label_elements.rs +++ b/src/parser/parse_from_text/markdown_elements/label_elements.rs @@ -12,9 +12,9 @@ use crate::parser::{ Element, }; -/// Parsers for label in labelled links and later also labled hashtags +/// Parsers for label in labelled links and later also labeled hashtags /// parse elements inside of label in markdown set -pub(crate) fn parse_label_elements(input: &str) -> std::vec::Vec { +pub(crate) fn parse_label_elements(input: &str) -> Vec { let mut result = Vec::new(); let mut remaining = input; // println!("p-{}", input);