Skip to content

Commit

Permalink
refactor(sidebar): use if instead of match
Browse files Browse the repository at this point in the history
  • Loading branch information
caugner committed Jan 3, 2025
1 parent e1fa4f1 commit 03e0070
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions crates/rari-doc/src/html/sidebar.rs
Original file line number Diff line number Diff line change
Expand Up @@ -620,10 +620,7 @@ impl SidebarMetaEntry {
out,
&url,
locale,
Some(match *recursive {
true => usize::MAX - 1,
false => 1,
}),
Some(if *recursive { usize::MAX - 1 } else { 1 }),
ListSubPagesContext {
sorter: None,
page_types: tags,
Expand Down Expand Up @@ -653,10 +650,7 @@ impl SidebarMetaEntry {
out,
&url,
locale,
Some(match *recursive {
true => usize::MAX - 1,
false => 1,
}),
Some(if *recursive { usize::MAX - 1 } else { 1 }),
ListSubPagesContext {
sorter: None,
page_types: tags,
Expand Down

0 comments on commit 03e0070

Please sign in to comment.