From 3da2a69e114d5dfeca15a76a5adf7bd7aef78a38 Mon Sep 17 00:00:00 2001 From: Roy Ivy III Date: Sat, 28 Dec 2019 12:04:04 -0600 Subject: [PATCH] refactor/polish ~ fix `cargo clippy` complaints (unneeded `String::from`) --- src/mktemp/mktemp.rs | 2 +- src/ptx/ptx.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mktemp/mktemp.rs b/src/mktemp/mktemp.rs index 04d293620..394497959 100644 --- a/src/mktemp/mktemp.rs +++ b/src/mktemp/mktemp.rs @@ -186,7 +186,7 @@ pub fn dry_exec(mut tmpdir: PathBuf, prefix: &str, rand: usize, suffix: &str) -> } } } - tmpdir.push(String::from(buf)); + tmpdir.push(buf); println!("{}", tmpdir.display()); 0 } diff --git a/src/ptx/ptx.rs b/src/ptx/ptx.rs index 04366a009..b79924541 100644 --- a/src/ptx/ptx.rs +++ b/src/ptx/ptx.rs @@ -249,7 +249,7 @@ fn create_word_set( } word_set.insert(WordRef { word: word, - filename: String::from(file.clone()), + filename: file.clone(), global_line_nr: offs + count, local_line_nr: count, position: beg,