Skip to content

Commit

Permalink
Pass reference instead of value (borrow error)
Browse files Browse the repository at this point in the history
  • Loading branch information
glcraft committed Oct 28, 2020
1 parent 1feba4a commit 1059738
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -150,5 +150,5 @@ fn main() {
String::from("")
}
},new_path.file_stem().unwrap().to_str().unwrap(),new_path.extension().unwrap().to_str().unwrap());
img_new.save(new_path).expect(&format!("Unable to save picture to {}", new_path));//format!("Unable to save picture to {}", new_path)
img_new.save(&new_path).expect(&format!("Unable to save picture to {}", &new_path));//format!("Unable to save picture to {}", new_path)
}

0 comments on commit 1059738

Please sign in to comment.