Skip to content

Commit

Permalink
Merge pull request #24 from glomdom/redundant-clone-call-opt
Browse files Browse the repository at this point in the history
Remove redundant clone() call.
  • Loading branch information
jaytaph authored Sep 24, 2023
2 parents 558e3dc + 77e363b commit 084120c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/bin/parser_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ fn read_tests(file_path: PathBuf) -> io::Result<Vec<Test>> {

let mut tests = Vec::new();
let mut current_test = Test {
file_path: file_path.to_str().unwrap().clone().to_string(),
file_path: file_path.to_str().unwrap().to_string(),
line: 1,
data: "".to_string(),
errors: vec![],
Expand All @@ -95,7 +95,7 @@ fn read_tests(file_path: PathBuf) -> io::Result<Vec<Test>> {
current_test.data = current_test.data.trim_end().to_string();
tests.push(current_test);
current_test = Test {
file_path: file_path.to_str().unwrap().clone().to_string(),
file_path: file_path.to_str().unwrap().to_string(),
line: line_num,
data: "".to_string(),
errors: vec![],
Expand Down

0 comments on commit 084120c

Please sign in to comment.