diff options
author | Stephan Dilly <dilly.stephan@gmail.com> | 2021-08-17 14:24:25 +0200 |
---|---|---|
committer | Stephan Dilly <dilly.stephan@gmail.com> | 2021-08-17 14:24:25 +0200 |
commit | dad8e8d43de79a3c39a37f118e529dc88fab5495 (patch) | |
tree | 32329a450106142d35374c88b776c74a679bd9a0 | |
parent | 25a49e22f267f467fb7436c799e1d01294e0a914 (diff) |
cargo fmt: use hardtabs
since it does not support hard-whitespaces its the only way to make whitespaces consisitent and checked
121 files changed, 25246 insertions, 25249 deletions
diff --git a/.vscode/settings.json b/.vscode/settings.json index a9c40cf5..bf7d5340 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,5 +1,4 @@ { "editor.formatOnSave": true, "workbench.settings.enableNaturalLanguageSearch": false, - "telemetry.enableTelemetry": false, }
\ No newline at end of file diff --git a/asyncgit/src/asyncjob/mod.rs b/asyncgit/src/asyncjob/mod.rs index 3b48787c..161df802 100644 --- a/asyncgit/src/asyncjob/mod.rs +++ b/asyncgit/src/asyncjob/mod.rs @@ -8,202 +8,202 @@ use std::sync::{Arc, Mutex}; /// trait that defines an async task we can run on a threadpool pub trait AsyncJob: Send + Sync + Clone { - /// can run a synchronous time intensive task - fn run(&mut self); + /// can run a synchronous time intensive task + fn run(&mut self); } /// Abstraction for a FIFO task queue that will only queue up **one** `next` job. /// It keeps overwriting the next job until it is actually taken to be processed #[derive(Debug, Clone)] pub struct AsyncSingleJob<J: AsyncJob, T: Copy + Send + 'static> { - next: Arc<Mutex<Option<J>>>, - last: Arc<Mutex<Option<J>>>, - sender: Sender<T>, - pending: Arc<Mutex<()>>, - notification: T, + next: Arc<Mutex<Option<J>>>, + last: Arc<Mutex<Option<J>>>, + sender: Sender<T>, + pending: Arc<Mutex<()>>, + notification: T, } impl<J: 'static + AsyncJob, T: Copy + Send + 'static> - AsyncSingleJob<J, T> + AsyncSingleJob<J, T> { - /// - pub fn new(sender: Sender<T>, value: T) -> Self { - Self { - next: Arc::new(Mutex::new(None)), - last: Arc::new(Mutex::new(None)), - pending: Arc::new(Mutex::new(())), - notification: value, - sender, - } |