From c106e8ac0eafdbb1c7c549f93f7e8ad0d3cd558c Mon Sep 17 00:00:00 2001 From: cat_or_not <41955154+catornot@users.noreply.github.com> Date: Sun, 16 Apr 2023 15:55:09 -0400 Subject: Use pass-by-reference where possible (#266) Use pass-by-reference where possible also contains some other small changes --- src-tauri/src/github/mod.rs | 2 +- src-tauri/src/github/pull_requests.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src-tauri/src/github') diff --git a/src-tauri/src/github/mod.rs b/src-tauri/src/github/mod.rs index c46d7c60..b336ab5c 100644 --- a/src-tauri/src/github/mod.rs +++ b/src-tauri/src/github/mod.rs @@ -86,7 +86,7 @@ pub fn compare_tags(first_tag: Tag, second_tag: Tag) -> Result { repo, first_tag.name, second_tag.name ); - let comparison: Comparison = client.get(&comparison_url).send().unwrap().json().unwrap(); + let comparison: Comparison = client.get(comparison_url).send().unwrap().json().unwrap(); let commits = comparison.commits; // Display the list of commits. diff --git a/src-tauri/src/github/pull_requests.rs b/src-tauri/src/github/pull_requests.rs index a7ac1fd2..96ac623f 100644 --- a/src-tauri/src/github/pull_requests.rs +++ b/src-tauri/src/github/pull_requests.rs @@ -259,7 +259,7 @@ pub async fn apply_launcher_pr( for file_name in files_to_copy { let source_file_path = format!("{}/{}", extract_directory, file_name); let destination_file_path = format!("{}/{}", game_install_path, file_name); - match std::fs::copy(&source_file_path, &destination_file_path) { + match std::fs::copy(source_file_path, destination_file_path) { Ok(_result) => (), Err(err) => { return Err(format!( -- cgit v1.2.3