Skip to content

Commit

Permalink
replace unused var
Browse files Browse the repository at this point in the history
  • Loading branch information
nnyyxxxx committed Oct 11, 2024
1 parent 8ee07dd commit 7745564
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion hyprland-parser/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -78,14 +78,15 @@ impl HyprlandConfig {
self.content
.insert(insert_pos + 2, format!("{}}}", " ".repeat(depth)));

for (section, &mut (ref mut start, ref mut end)) in self.sections.iter_mut() {
for (start, end) in self.sections.values_mut() {
if *start >= insert_pos {
*start += 3;
*end += 3;
} else if *end >= insert_pos {
*end += 3;
}
}

self.sections
.insert(current_section.clone(), (insert_pos, insert_pos + 2));
return;
Expand Down

0 comments on commit 7745564

Please sign in to comment.