diff options
author | Jesse Luehrs <doy@tozt.net> | 2022-03-04 18:55:29 -0500 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2022-03-04 18:55:29 -0500 |
commit | 1b87a061d8fa047eac2bc1dc93e60cd2489e477b (patch) | |
tree | e530c2490994f56e73c994ff31ee9702088ff037 /src/shell/event.rs | |
parent | e1bfb9bc59a6a97594cb5c2c51cc4ca8ee813a23 (diff) | |
download | nbsh-1b87a061d8fa047eac2bc1dc93e60cd2489e477b.tar.gz nbsh-1b87a061d8fa047eac2bc1dc93e60cd2489e477b.zip |
remove the mutex around exit_info
it is small enough that copying it is not really a big deal
Diffstat (limited to 'src/shell/event.rs')
-rw-r--r-- | src/shell/event.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/shell/event.rs b/src/shell/event.rs index fe96d5b..dc58e6f 100644 --- a/src/shell/event.rs +++ b/src/shell/event.rs @@ -7,7 +7,7 @@ pub enum Event { PtyOutput, ChildRunPipeline(usize, (usize, usize)), ChildSuspend(usize), - ChildExit(usize, Option<Env>), + ChildExit(usize, super::history::ExitInfo, Option<Env>), GitInfo(Option<super::inputs::GitInfo>), ClockTimer, } @@ -94,7 +94,7 @@ struct Pending { pty_output: bool, child_run_pipeline: std::collections::VecDeque<(usize, (usize, usize))>, child_suspend: std::collections::VecDeque<usize>, - child_exit: Option<(usize, Option<Env>)>, + child_exit: Option<(usize, super::history::ExitInfo, Option<Env>)>, git_info: Option<Option<super::inputs::GitInfo>>, clock_timer: bool, done: bool, @@ -121,8 +121,8 @@ impl Pending { if let Some(idx) = self.child_suspend.pop_front() { return Some(Some(Event::ChildSuspend(idx))); } - if let Some((idx, env)) = self.child_exit.take() { - return Some(Some(Event::ChildExit(idx, env))); + if let Some((idx, exit_info, env)) = self.child_exit.take() { + return Some(Some(Event::ChildExit(idx, exit_info, env))); } if let Some(info) = self.git_info.take() { return Some(Some(Event::GitInfo(info))); @@ -152,8 +152,8 @@ impl Pending { Some(Event::ChildSuspend(idx)) => { self.child_suspend.push_back(idx); } - Some(Event::ChildExit(idx, env)) => { - self.child_exit = Some((idx, env)); + Some(Event::ChildExit(idx, exit_info, env)) => { + self.child_exit = Some((idx, exit_info, env)); } Some(Event::GitInfo(info)) => self.git_info = Some(info), Some(Event::ClockTimer) => self.clock_timer = true, |