Fix clippy warnings

This commit is contained in:
Patrick Förster 2023-05-28 20:01:41 +02:00
parent 588f92df09
commit a7861ffe19
13 changed files with 22 additions and 34 deletions

View file

@ -75,12 +75,12 @@ impl ForwardSearch {
};
if !pdf_path.exists() {
return Err(ForwardSearchError::PdfNotFound(pdf_path.clone()));
return Err(ForwardSearchError::PdfNotFound(pdf_path));
}
let tex_path = tex_path.to_string_lossy().into_owned();
let pdf_path = pdf_path.to_string_lossy().into_owned();
let line = line.unwrap_or_else(|| child.cursor.line);
let line = line.unwrap_or(child.cursor.line);
let line = (line + 1).to_string();
let program = config.program.clone();

View file

@ -17,7 +17,7 @@ pub fn replace_placeholders(args: &[String], pairs: &[(char, &str)]) -> Vec<Stri
if ch == '%' {
match chars.next() {
Some(key) => match map.get(&key) {
Some(value) => output.push_str(&value),
Some(value) => output.push_str(value),
None => output.push(key),
},
None => output.push('%'),