diff --git a/packages/butler/src/commands/info.rs b/packages/butler/src/commands/info.rs index da7bfab33..053c30932 100644 --- a/packages/butler/src/commands/info.rs +++ b/packages/butler/src/commands/info.rs @@ -26,7 +26,7 @@ impl super::RunCommand for Info { // find the project in project storage that matches the cwd println!("{}", "project:".to_string().red()); - println!(" id: {}", app.project().id.blue()); + println!(" id: {}", app.project().id.to_string().blue()); println!(" title: {}", app.project().title.blue()); println!( " description: {}", @@ -77,7 +77,7 @@ impl super::RunCommand for Info { .unwrap(); //list the sessions for session in &sessions { - println!(" id: {}", session.id.blue()); + println!(" id: {}", session.id.to_string().blue()); } // gitbutler repo stuff diff --git a/packages/tauri/src/id.rs b/packages/tauri/src/id.rs index 92da92290..44a5df1ef 100644 --- a/packages/tauri/src/id.rs +++ b/packages/tauri/src/id.rs @@ -7,7 +7,7 @@ pub struct Id(Uuid, PhantomData); impl Hash for Id { fn hash(&self, state: &mut H) { - self.0.hash(state) + self.0.hash(state); } } @@ -71,7 +71,7 @@ impl Serialize for Id { impl Clone for Id { fn clone(&self) -> Self { - Self(self.0, PhantomData) + *self } } diff --git a/packages/tauri/src/watcher/dispatchers/file_change.rs b/packages/tauri/src/watcher/dispatchers/file_change.rs index 849f7d5f2..b65108652 100644 --- a/packages/tauri/src/watcher/dispatchers/file_change.rs +++ b/packages/tauri/src/watcher/dispatchers/file_change.rs @@ -71,7 +71,7 @@ impl Dispatcher { .name(&format!("{} file watcher", project_id)) .spawn({ let path = path.to_path_buf(); - let project_id = project_id.clone(); + let project_id = *project_id; async move { while let Some(file_path) = notify_rx.recv().await { match file_path.strip_prefix(&path) { diff --git a/packages/tauri/src/watcher/dispatchers/mod.rs b/packages/tauri/src/watcher/dispatchers/mod.rs index 8ff73af13..caa552b5f 100644 --- a/packages/tauri/src/watcher/dispatchers/mod.rs +++ b/packages/tauri/src/watcher/dispatchers/mod.rs @@ -57,7 +57,7 @@ impl Dispatcher { ))?; let (tx, rx) = channel(1); - let project_id = project_id.to_owned(); + let project_id = *project_id; task::Builder::new() .name(&format!("{} dispatcher", project_id)) .spawn(async move { diff --git a/packages/tauri/src/watcher/handlers/git_file_change.rs b/packages/tauri/src/watcher/handlers/git_file_change.rs index d47d60f6d..a60fe0545 100644 --- a/packages/tauri/src/watcher/handlers/git_file_change.rs +++ b/packages/tauri/src/watcher/handlers/git_file_change.rs @@ -71,10 +71,7 @@ impl Handler { .get_current_session() .context("failed to get current session")? { - return Ok(vec![events::Event::Flush( - project.id.clone(), - current_session, - )]); + return Ok(vec![events::Event::Flush(project.id, current_session)]); } } diff --git a/packages/tauri/src/watcher/mod.rs b/packages/tauri/src/watcher/mod.rs index 3986650b0..54658c0f6 100644 --- a/packages/tauri/src/watcher/mod.rs +++ b/packages/tauri/src/watcher/mod.rs @@ -41,7 +41,7 @@ impl Watchers { let watcher = Watcher::try_from(&self.app_handle)?; let c_watcher = watcher.clone(); - let project_id = project.id.clone(); + let project_id = project.id; let project_path = project.path.clone(); task::Builder::new()