From 2320fb35cd97c622edccfea3c6f377a34b0c1c8c Mon Sep 17 00:00:00 2001 From: OMGeeky Date: Sun, 28 Apr 2024 12:35:10 +0200 Subject: [PATCH] fix clippy hints --- src/client.rs | 2 +- src/client/utils.rs | 4 ++-- src/main.rs | 2 -- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/client.rs b/src/client.rs index eca55da..b734570 100644 --- a/src/client.rs +++ b/src/client.rs @@ -57,7 +57,7 @@ impl SplitterClient { async fn inner_split_video(&self, id: &str) -> Result { let base_path = Path::new(&self.conf.download_folder_path); let input_path = base_path.join(format!("{}.mp4", id)); - let output_folder_path = base_path.join(&id); + let output_folder_path = base_path.join(id); info!("Splitting video with id: {}", id); verify_paths(base_path, &input_path, &output_folder_path).await?; diff --git a/src/client/utils.rs b/src/client/utils.rs index a84d903..0f291a6 100644 --- a/src/client/utils.rs +++ b/src/client/utils.rs @@ -67,7 +67,7 @@ async fn join_last_two_parts(input_parts: &mut PlaylistInfo, base_folder: &Path) .parts .last_mut() .ok_or(SplitterError::JoinRequiresAtLeastTwoParts)?; - second_last_part.duration = second_last_part.duration + last_part.duration; + second_last_part.duration += last_part.duration; let second_last_part_path = combine_path_as_string(base_folder, &second_last_part.path)?; let last_part_path = combine_path_as_string(base_folder, &last_part.path)?; let join_txt_path = base_folder @@ -147,7 +147,7 @@ pub(crate) async fn get_playlist_info(playlist_path: &PathBuf) -> Result