diff options
author | Norbert Preining <norbert@preining.info> | 2020-05-28 03:03:21 +0000 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2020-05-28 03:03:21 +0000 |
commit | 745892fbddea56040139108277e728b53fd8fc11 (patch) | |
tree | 15e55e299b38fccdabce8364f1fbf4f02ef37994 /support/texlab/src/action.rs | |
parent | 195ca7e0c377d83455867bdd8e409d4e1cf024ea (diff) |
CTAN sync 202005280303
Diffstat (limited to 'support/texlab/src/action.rs')
-rw-r--r-- | support/texlab/src/action.rs | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/support/texlab/src/action.rs b/support/texlab/src/action.rs deleted file mode 100644 index da52333ff0..0000000000 --- a/support/texlab/src/action.rs +++ /dev/null @@ -1,37 +0,0 @@ -use crate::workspace::Uri; -use lsp_types::ProgressToken; -use std::mem; -use std::sync::Mutex; - -#[derive(Debug, PartialEq, Eq, Clone)] -pub enum LintReason { - Change, - Save, -} - -#[derive(Debug, PartialEq, Eq, Clone)] -pub enum Action { - CheckInstalledDistribution, - DetectRoot(Uri), - PublishDiagnostics, - RunLinter(Uri, LintReason), - Build(Uri), - CancelBuild(ProgressToken), -} - -#[derive(Debug, Default)] -pub struct ActionManager { - actions: Mutex<Vec<Action>>, -} - -impl ActionManager { - pub fn push(&self, action: Action) { - let mut actions = self.actions.lock().unwrap(); - actions.push(action); - } - - pub fn take(&self) -> Vec<Action> { - let mut actions = self.actions.lock().unwrap(); - mem::replace(&mut *actions, Vec::new()) - } -} |