Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
fix(cli): preserve --limit 0 semantics in markets list
Return empty result when limit <= 0 before pagination to avoid forcing one-row output.
  • Loading branch information
morluto committed Feb 24, 2026
commit 3c9cb35acefa3622adfca962b551559a89c06335
5 changes: 4 additions & 1 deletion src/commands/markets.rs
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,10 @@ async fn list_markets(
active: Option<bool>,
closed: Option<bool>,
) -> Result<Vec<Market>> {
let page_size = limit.max(1);
if limit <= 0 {
return Ok(Vec::new());
}
let page_size = limit;
let mut next_offset = offset.unwrap_or(0);
let mut collected: Vec<Market> = Vec::new();

Expand Down