Skip to content

Commit

Permalink
format code
Browse files Browse the repository at this point in the history
  • Loading branch information
raphamorim committed Jan 11, 2025
1 parent 94e41a1 commit c8d340b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
10 changes: 6 additions & 4 deletions frontends/rioterm/src/renderer/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -276,11 +276,13 @@ impl Renderer {
};
style.background_color = Some(self.named_colors.selection_background);
} else if search_hints.is_some()
&& search_hints.as_mut().is_some_and(|search| {
search.advance(Pos::new(line, Column(column)))
})
&& search_hints
.as_mut()
.is_some_and(|search| search.advance(Pos::new(line, Column(column))))
{
let is_focused = focused_match.as_ref().is_some_and(|fm| fm.contains(&Pos::new(line, Column(column))));
let is_focused = focused_match
.as_ref()
.is_some_and(|fm| fm.contains(&Pos::new(line, Column(column))));
if is_focused {
style.color = self.named_colors.search_focused_match_foreground;
style.background_color =
Expand Down
4 changes: 3 additions & 1 deletion rio-backend/src/performer/handler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,9 @@ fn parse_number(input: &[u8]) -> Option<u8> {
for c in input {
let c = *c as char;
if let Some(digit) = c.to_digit(10) {
num = num.checked_mul(10).and_then(|v| v.checked_add(digit as u8))?
num = num
.checked_mul(10)
.and_then(|v| v.checked_add(digit as u8))?
} else {
return None;
}
Expand Down

0 comments on commit c8d340b

Please sign in to comment.