mirror of
https://github.com/Cyrix126/gupaxx.git
synced 2025-03-11 08:56:22 +00:00
fix: fmt
Some checks are pending
Audit / audit (push) Waiting to run
Lockbud / lockbud (push) Waiting to run
Rust / fmt (push) Waiting to run
Rust / test (macos-latest) (push) Waiting to run
Rust / test (ubuntu-latest) (push) Waiting to run
Rust / clippy (macos-latest) (push) Waiting to run
Rust / clippy (ubuntu-latest) (push) Waiting to run
Rust / check (macos-latest) (push) Waiting to run
Rust / check (ubuntu-latest) (push) Waiting to run
Rust / doc (macos-latest) (push) Waiting to run
Rust / doc (ubuntu-latest) (push) Waiting to run
Typo / typo (push) Waiting to run
Some checks are pending
Audit / audit (push) Waiting to run
Lockbud / lockbud (push) Waiting to run
Rust / fmt (push) Waiting to run
Rust / test (macos-latest) (push) Waiting to run
Rust / test (ubuntu-latest) (push) Waiting to run
Rust / clippy (macos-latest) (push) Waiting to run
Rust / clippy (ubuntu-latest) (push) Waiting to run
Rust / check (macos-latest) (push) Waiting to run
Rust / check (ubuntu-latest) (push) Waiting to run
Rust / doc (macos-latest) (push) Waiting to run
Rust / doc (ubuntu-latest) (push) Waiting to run
Typo / typo (push) Waiting to run
This commit is contained in:
parent
e65d4e6487
commit
2a8d013622
1 changed files with 8 additions and 6 deletions
|
@ -115,11 +115,13 @@ impl ProcessStatesGui {
|
|||
// order is important for lock
|
||||
pub fn new(app: &App) -> Self {
|
||||
let mut process_states = ProcessStatesGui(vec![]);
|
||||
for process in [&app.node,
|
||||
for process in [
|
||||
&app.node,
|
||||
&app.p2pool,
|
||||
&app.xmrig,
|
||||
&app.xmrig_proxy,
|
||||
&app.xvb] {
|
||||
&app.xvb,
|
||||
] {
|
||||
let lock = process.lock().unwrap();
|
||||
process_states.push(ProcessStateGui {
|
||||
name: lock.name,
|
||||
|
@ -133,13 +135,13 @@ impl ProcessStatesGui {
|
|||
pub fn is_alive(&self, name: ProcessName) -> bool {
|
||||
self.iter()
|
||||
.find(|p| p.name == name)
|
||||
.unwrap_or_else(|| panic!("This vec should always contains all Processes {:?}",
|
||||
self))
|
||||
.unwrap_or_else(|| panic!("This vec should always contains all Processes {:?}", self))
|
||||
.alive
|
||||
}
|
||||
pub fn find(&self, name: ProcessName) -> &ProcessStateGui {
|
||||
self.iter().find(|p| p.name == name).unwrap_or_else(|| panic!("This vec should always contains all Processes {:?}",
|
||||
self))
|
||||
self.iter()
|
||||
.find(|p| p.name == name)
|
||||
.unwrap_or_else(|| panic!("This vec should always contains all Processes {:?}", self))
|
||||
}
|
||||
pub fn find_mut(&mut self, name: ProcessName) -> &mut ProcessStateGui {
|
||||
self.iter_mut()
|
||||
|
|
Loading…
Reference in a new issue