We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9594fa8 commit 9dad659Copy full SHA for 9dad659
1 file changed
components/config/src/config/taxonomies.rs
@@ -32,18 +32,10 @@ impl Default for TaxonomyConfig {
32
33
impl TaxonomyConfig {
34
pub fn is_paginated(&self) -> bool {
35
- if let Some(paginate_by) = self.paginate_by {
36
- paginate_by > 0
37
- } else {
38
- false
39
- }
+ self.paginate_by.is_some_and(|paginate_by| paginate_by > 0)
40
}
41
42
pub fn paginate_path(&self) -> &str {
43
- if let Some(ref path) = self.paginate_path {
44
- path
45
46
- "page"
47
+ self.paginate_path.as_deref().unwrap_or("page")
48
49
0 commit comments