mirror of
https://github.com/gitbutlerapp/gitbutler.git
synced 2025-01-07 18:42:18 +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
|
// find the project in project storage that matches the cwd
|
||||||
println!("{}", "project:".to_string().red());
|
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!(" title: {}", app.project().title.blue());
|
||||||
println!(
|
println!(
|
||||||
" description: {}",
|
" description: {}",
|
||||||
@ -77,7 +77,7 @@ impl super::RunCommand for Info {
|
|||||||
.unwrap();
|
.unwrap();
|
||||||
//list the sessions
|
//list the sessions
|
||||||
for session in &sessions {
|
for session in &sessions {
|
||||||
println!(" id: {}", session.id.blue());
|
println!(" id: {}", session.id.to_string().blue());
|
||||||
}
|
}
|
||||||
|
|
||||||
// gitbutler repo stuff
|
// gitbutler repo stuff
|
||||||
|
@ -7,7 +7,7 @@ pub struct Id<T>(Uuid, PhantomData<T>);
|
|||||||
|
|
||||||
impl<T> Hash for Id<T> {
|
impl<T> Hash for Id<T> {
|
||||||
fn hash<H: std::hash::Hasher>(&self, state: &mut H) {
|
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> {
|
impl<T> Clone for Id<T> {
|
||||||
fn clone(&self) -> Self {
|
fn clone(&self) -> Self {
|
||||||
Self(self.0, PhantomData)
|
*self
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -71,7 +71,7 @@ impl Dispatcher {
|
|||||||
.name(&format!("{} file watcher", project_id))
|
.name(&format!("{} file watcher", project_id))
|
||||||
.spawn({
|
.spawn({
|
||||||
let path = path.to_path_buf();
|
let path = path.to_path_buf();
|
||||||
let project_id = project_id.clone();
|
let project_id = *project_id;
|
||||||
async move {
|
async move {
|
||||||
while let Some(file_path) = notify_rx.recv().await {
|
while let Some(file_path) = notify_rx.recv().await {
|
||||||
match file_path.strip_prefix(&path) {
|
match file_path.strip_prefix(&path) {
|
||||||
|
@ -57,7 +57,7 @@ impl Dispatcher {
|
|||||||
))?;
|
))?;
|
||||||
|
|
||||||
let (tx, rx) = channel(1);
|
let (tx, rx) = channel(1);
|
||||||
let project_id = project_id.to_owned();
|
let project_id = *project_id;
|
||||||
task::Builder::new()
|
task::Builder::new()
|
||||||
.name(&format!("{} dispatcher", project_id))
|
.name(&format!("{} dispatcher", project_id))
|
||||||
.spawn(async move {
|
.spawn(async move {
|
||||||
|
@ -71,10 +71,7 @@ impl Handler {
|
|||||||
.get_current_session()
|
.get_current_session()
|
||||||
.context("failed to get current session")?
|
.context("failed to get current session")?
|
||||||
{
|
{
|
||||||
return Ok(vec![events::Event::Flush(
|
return Ok(vec![events::Event::Flush(project.id, current_session)]);
|
||||||
project.id.clone(),
|
|
||||||
current_session,
|
|
||||||
)]);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -41,7 +41,7 @@ impl Watchers {
|
|||||||
let watcher = Watcher::try_from(&self.app_handle)?;
|
let watcher = Watcher::try_from(&self.app_handle)?;
|
||||||
|
|
||||||
let c_watcher = watcher.clone();
|
let c_watcher = watcher.clone();
|
||||||
let project_id = project.id.clone();
|
let project_id = project.id;
|
||||||
let project_path = project.path.clone();
|
let project_path = project.path.clone();
|
||||||
|
|
||||||
task::Builder::new()
|
task::Builder::new()
|
||||||
|
Loading…
Reference in New Issue
Block a user