Remove unneeded enum value
parent
385ae17bb7
commit
aa7e6c7e3b
|
@ -41,7 +41,6 @@ struct ProcessTree {
|
|||
enum ChangeState {
|
||||
Active,
|
||||
Inactive,
|
||||
Quit
|
||||
}
|
||||
|
||||
pub struct Processes {
|
||||
|
@ -147,8 +146,7 @@ fn update_thread(
|
|||
};
|
||||
match status_channel.recv_timeout(timeout) {
|
||||
Err(RecvTimeoutError::Timeout) => {},
|
||||
Err(RecvTimeoutError::Disconnected)
|
||||
| Ok(ChangeState::Quit) => { return; },
|
||||
Err(RecvTimeoutError::Disconnected) => { return; },
|
||||
Ok(ChangeState::Active) => { active = true; },
|
||||
Ok(ChangeState::Inactive) => { active = false; },
|
||||
}
|
||||
|
@ -438,9 +436,3 @@ impl ProcessesTrait for Processes {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl Drop for Processes {
|
||||
fn drop(&mut self) {
|
||||
self.channel.send(ChangeState::Quit).expect("Process thread died.");
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue