I've given the complete error on a screenshot, but basically not understanding why after cloning the parameter I'm still getting this message. There's a warning that cloned_md_string needs to be borrowed as static but if I'm cloning it how am I still borrowing it?
pub fn convert_md_to_html(&self, md_string: String) -> Vec<HtmlElement<AnyElement>> {
let cloned_md_string = md_string.clone();
let md_lines = cloned_md_string.split('\n').collect::<Vec<&str>>();
let mut html_lines: Vec<HtmlElement<AnyElement>> = vec![];
let mut ol_started = false;
let mut current_found_ol: Vec<HtmlElement<AnyElement>> = vec![];
let mut ul_started = false;
let mut current_found_ul: Vec<HtmlElement<AnyElement>> = vec![];
let mut code_started = false;
let mut code_ended = false;
let mut code_sections: Vec<HtmlElement<AnyElement>> = vec![];
for md_line in md_lines.clone() {
let cloned_line = md_line.clone();
// more code here