Skip to content

Commit 77b7046

Browse files
committed
perf: Remove unneeded allocation
1 parent 56510d6 commit 77b7046

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

src/led.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,9 +92,6 @@ impl Led {
9292
state: &mut State,
9393
adaptive_brightness: bool,
9494
) -> anyhow::Result<()> {
95-
let mut p = self.path.clone();
96-
p.push(BRIGHTNESS);
97-
9895
// If hardware monitoring is not supported, try reading the previous value.
9996
if adaptive_brightness && self.hw_monitor_path.is_none() && brightness == 0 {
10097
let old_brightness = read_int(&mut self.brightness_file)?;

0 commit comments

Comments
 (0)