Skip to content

Commit 4131a98

Browse files
committed
chore: review comments
1 parent d7ddadd commit 4131a98

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

crates/tx-cache/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,4 @@ eyre.workspace = true
2121
reqwest.workspace = true
2222
serde = { workspace = true, features = ["derive"] }
2323
tracing.workspace = true
24-
uuid = { workspace = true, features = ["serde", "v4"] }
24+
uuid = { workspace = true, features = ["serde"] }

crates/tx-cache/src/types.rs

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -450,19 +450,17 @@ impl TxCacheSendOrderResponse {
450450
pub struct PaginationInfo<C: CursorKey> {
451451
/// The next cursor.
452452
next_cursor: Option<C>,
453-
/// Whether there is a next page.
454-
has_next_page: bool,
455453
}
456454

457455
impl<C: CursorKey> PaginationInfo<C> {
458456
/// Create a new [`PaginationInfo`].
459-
pub const fn new(next_cursor: Option<C>, has_next_page: bool) -> Self {
460-
Self { next_cursor, has_next_page }
457+
pub const fn new(next_cursor: Option<C>) -> Self {
458+
Self { next_cursor }
461459
}
462460

463461
/// Create an empty [`PaginationInfo`].
464462
pub const fn empty() -> Self {
465-
Self { next_cursor: None, has_next_page: false }
463+
Self { next_cursor: None }
466464
}
467465

468466
/// Get the next cursor.
@@ -477,7 +475,7 @@ impl<C: CursorKey> PaginationInfo<C> {
477475

478476
/// Check if there is a next page in the response.
479477
pub const fn has_next_page(&self) -> bool {
480-
self.has_next_page
478+
self.next_cursor.is_some()
481479
}
482480
}
483481

0 commit comments

Comments
 (0)