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.
PaginationOptions::is_backward()
1 parent 0e21380 commit 6bb6793Copy full SHA for 6bb6793
src/controllers/helpers/pagination.rs
@@ -56,6 +56,10 @@ impl PaginationOptions {
56
None
57
}
58
59
+
60
+ pub(crate) fn is_backward(&self) -> bool {
61
+ matches!(self.page, Page::SeekBackward(_))
62
+ }
63
64
65
#[derive(Debug, Deserialize, FromRequestParts, utoipa::IntoParams)]
src/controllers/krate/search.rs
@@ -120,7 +120,7 @@ pub async fn list_crates(
120
.limit_page_numbers()
121
.enable_seek(true)
122
.gather(&req)?;
123
- let is_forward = !matches!(pagination.page, Page::SeekBackward(_));
+ let is_forward = !pagination.is_backward();
124
125
if let Some(q_string) = &filter_params.q_string {
126
if !q_string.is_empty() {
0 commit comments