Tab::process -> Tab::is_dead
This commit is contained in:
1 parent
9520970b66
commit
fa0ea270f4
2 files changed
+9
-5
No files matched your search
@@ -34,8 +34,12 @@ impl Tab {
|
||||
self.terminal.borrow_mut()
|
||||
}
|
||||
|
||||
pub fn process(&self) -> RefMut<Child> {
|
||||
self.process.borrow_mut()
|
||||
pub fn is_dead(&self) -> bool {
|
||||
if let Ok(None) = self.process.borrow_mut().try_wait() {
|
||||
false
|
||||
} else {
|
||||
true
|
||||
}
|
||||
}
|
||||
|
||||
pub fn resize(
|
||||
|
||||
@@ -250,10 +250,10 @@ pub trait TerminalWindow {
|
||||
let dead_tabs: Vec<Rc<Tab>> = tabs
|
||||
.iter()
|
||||
.filter_map(|tab| {
|
||||
if let Ok(None) = tab.process().try_wait() {
|
||||
None
|
||||
} else {
|
||||
if tab.is_dead() {
|
||||
Some(Rc::clone(tab))
|
||||
} else {
|
||||
None
|
||||
}
|
||||
})
|
||||
.collect();
|
||||
|
||||
Reference in new issue
Block a user