From 47836aa8d62a5999bcd682d46158e1be9be471b7 Mon Sep 17 00:00:00 2001 From: OMGeeky Date: Sun, 28 Apr 2024 01:53:30 +0200 Subject: [PATCH] remove clone --- src/client.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/client.rs b/src/client.rs index 77a5abe..eca55da 100644 --- a/src/client.rs +++ b/src/client.rs @@ -33,7 +33,7 @@ impl SplitterClient { let mut video = video.into_active_model(); video.status = ActiveValue::Set(Status::Splitting); video.clone().update(&self.db).await?; - let result = self.inner_split_video(id.clone()).await; + let result = self.inner_split_video(&id).await; match result { Ok(count) => { @@ -54,7 +54,7 @@ impl SplitterClient { } Ok(()) } - async fn inner_split_video(&self, id: String) -> Result { + 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);