Skip to content

Commit 5690042

Browse files
committed
feat: error use 1
1 parent b9413e3 commit 5690042

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

frameworks/Rust/hyperlane/src/route.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,9 @@ pub async fn queries(controller_data: ControllerData) {
2929
.get_request_query("q")
3030
.await
3131
.and_then(|queries| queries.parse::<Queries>().ok())
32-
.unwrap_or(1)
33-
.min(ROW_LIMIT as usize);
32+
.unwrap_or_default()
33+
.min(ROW_LIMIT as usize)
34+
.max(1);
3435
let mut data: Vec<QueryRow> = Vec::with_capacity(queries);
3536
for _ in 0..queries {
3637
let _ = random_world_row().await.map(|row| {

0 commit comments

Comments
 (0)