Skip to content

Commit

Permalink
🎨 Optimized memory usage by removing unnecessary clone in src/main.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
duralsh committed Dec 13, 2023
1 parent 056b50d commit 90b7744
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 @@ -52,7 +52,7 @@ fn selected_commit() {
let selection = cursor::navigate_strings(&combined);
match selection {
Some(files) => {
let diff_arguments: Vec<String> = files.clone()
let diff_arguments: Vec<String> = files // Truncating the newly added files
.iter()
.filter(|file| modified.contains(file))
.cloned()
Expand Down

0 comments on commit 90b7744

Please sign in to comment.