Skip to content

Commit 56e9065

Browse files
committed
patch: better naming and fixed misleading comment
1 parent b7f7198 commit 56e9065

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

src/protocols/output_power_management.rs

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -83,17 +83,17 @@ impl OutputPowerManagementManagerState {
8383
}
8484

8585
pub fn output_removed(&mut self, output: &Output) {
86-
if let Some(list) = self.output_powers.remove(output) {
87-
for num in list {
88-
num.failed();
86+
if let Some(power_ctls) = self.output_powers.remove(output) {
87+
for power_ctl in power_ctls {
88+
power_ctl.failed();
8989
}
9090
}
9191
}
9292

9393
pub fn output_power_mode_changed(&mut self, output: &Output, mode: Mode) {
94-
if let Some(list) = self.output_powers.get_mut(output) {
95-
for num in list {
96-
num.mode(mode.into());
94+
if let Some(power_ctls) = self.output_powers.get_mut(output) {
95+
for power_ctl in power_ctls {
96+
power_ctl.mode(mode.into());
9797
}
9898
}
9999
}
@@ -152,8 +152,7 @@ where
152152
return;
153153
}
154154

155-
// Output not found,
156-
// or output power instance already exists
155+
// Output not found
157156
zwlr_output_power.failed();
158157
}
159158
zwlr_output_power_manager_v1::Request::Destroy => (),

0 commit comments

Comments
 (0)