all: refactor to cargo workspace, remove config shared library, remove protocol perms, add dpms cli (#7)
This commit is contained in:
parent
5db14936e7
commit
bfc2a525de
616 changed files with 32344 additions and 31026 deletions
|
|
@ -1,6 +1,6 @@
|
|||
use {
|
||||
crate::{
|
||||
backend::transaction::{BackendConnectorTransactionError, ConnectorTransaction},
|
||||
backend::transaction::BackendConnectorTransactionError,
|
||||
state::State,
|
||||
utils::{
|
||||
errorfmt::ErrorFmt,
|
||||
|
|
@ -136,15 +136,7 @@ impl Idle {
|
|||
}
|
||||
|
||||
fn try_set_idle(&self, idle: bool) -> Result<(), BackendConnectorTransactionError> {
|
||||
let mut tran = ConnectorTransaction::new(&self.state);
|
||||
for connector in self.state.connectors.lock().values() {
|
||||
let mut state = connector.state.borrow().clone();
|
||||
state.active = !idle;
|
||||
tran.add(&connector.connector, state)?;
|
||||
}
|
||||
tran.prepare()?.apply()?.commit();
|
||||
self.state.set_backend_idle(idle);
|
||||
Ok(())
|
||||
self.state.set_connectors_active(!idle)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue