mirror of
https://github.com/gitbutlerapp/gitbutler.git
synced 2025-01-06 01:27:24 +03:00
clippy fixes
This commit is contained in:
parent
00a631fd2d
commit
a589b934a2
@ -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
|
||||
|
@ -7,7 +7,7 @@ pub struct Id<T>(Uuid, PhantomData<T>);
|
||||
|
||||
impl<T> Hash for Id<T> {
|
||||
fn hash<H: std::hash::Hasher>(&self, state: &mut H) {
|
||||
self.0.hash(state)
|
||||
self.0.hash(state);
|
||||
}
|
||||
}
|
||||
|
||||
@ -71,7 +71,7 @@ impl<T> Serialize for Id<T> {
|
||||
|
||||
impl<T> Clone for Id<T> {
|
||||
fn clone(&self) -> Self {
|
||||
Self(self.0, PhantomData)
|
||||
*self
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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) {
|
||||
|
@ -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 {
|
||||
|
@ -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)]);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user