Skip to content

Commit 3467d89

Browse files
committed
Initial examples refactoring
1 parent 51b6661 commit 3467d89

File tree

4 files changed

+264
-207
lines changed

4 files changed

+264
-207
lines changed

embedded-service/src/power/policy/device.rs

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -128,11 +128,7 @@ impl InternalState {
128128
Ok(())
129129
} else {
130130
Err(Error::InvalidState(
131-
&[
132-
StateKind::Idle,
133-
StateKind::ConnectedConsumer,
134-
StateKind::ConnectedProvider,
135-
],
131+
&[StateKind::Idle, StateKind::ConnectedConsumer],
136132
self.state.kind(),
137133
))
138134
};
@@ -157,11 +153,7 @@ impl InternalState {
157153
Ok(())
158154
} else {
159155
Err(Error::InvalidState(
160-
&[
161-
StateKind::Idle,
162-
StateKind::ConnectedConsumer,
163-
StateKind::ConnectedProvider,
164-
],
156+
&[StateKind::Idle, StateKind::ConnectedProvider],
165157
self.state.kind(),
166158
))
167159
};

0 commit comments

Comments
 (0)