mirror of
https://github.com/gitbutlerapp/gitbutler.git
synced 2024-12-24 01:51:57 +03:00
Don't consume instances that are Send+Sync+Clone
They don't actually need it.
This commit is contained in:
parent
de6fd55658
commit
52c637504e
@ -40,7 +40,7 @@ impl Dispatcher {
|
||||
}
|
||||
|
||||
pub fn run<P: AsRef<path::Path>>(
|
||||
self,
|
||||
&self,
|
||||
project_id: &ProjectId,
|
||||
path: P,
|
||||
) -> Result<Receiver<events::Event>, RunError> {
|
||||
@ -54,10 +54,11 @@ impl Dispatcher {
|
||||
|
||||
let (tx, rx) = channel(1);
|
||||
let project_id = *project_id;
|
||||
let cancellation_token = self.cancellation_token.clone();
|
||||
task::spawn(async move {
|
||||
loop {
|
||||
select! {
|
||||
() = self.cancellation_token.cancelled() => {
|
||||
() = cancellation_token.cancelled() => {
|
||||
break;
|
||||
}
|
||||
Some(event) = file_change_rx.recv() => {
|
||||
|
@ -45,7 +45,7 @@ impl Dispatcher {
|
||||
}
|
||||
|
||||
pub fn run(
|
||||
self,
|
||||
&self,
|
||||
project_id: &ProjectId,
|
||||
path: &path::Path,
|
||||
) -> Result<Receiver<events::Event>, RunError> {
|
||||
|
Loading…
Reference in New Issue
Block a user