diff --git a/src/commands/comments.rs b/src/commands/comments.rs index 9c55fad..e5deddd 100644 --- a/src/commands/comments.rs +++ b/src/commands/comments.rs @@ -112,7 +112,7 @@ pub async fn execute( .limit(limit) .maybe_offset(offset) .maybe_order(order) - .maybe_ascending(if ascending { Some(true) } else { None }) + .maybe_ascending(Some(ascending)) .build(); let comments = client.comments(&request).await?; @@ -150,7 +150,7 @@ pub async fn execute( .limit(limit) .maybe_offset(offset) .maybe_order(order) - .maybe_ascending(if ascending { Some(true) } else { None }) + .maybe_ascending(Some(ascending)) .build(); let comments = client.comments_by_user_address(&request).await?; diff --git a/src/commands/events.rs b/src/commands/events.rs index b5d947a..f5cb1ab 100644 --- a/src/commands/events.rs +++ b/src/commands/events.rs @@ -79,7 +79,7 @@ pub async fn execute(client: &gamma::Client, args: EventsArgs, output: OutputFor .limit(limit) .maybe_closed(resolved_closed) .maybe_offset(offset) - .maybe_ascending(if ascending { Some(true) } else { None }) + .maybe_ascending(Some(ascending)) .maybe_tag_slug(tag) .order(order.into_iter().collect::>()) .build(); diff --git a/src/commands/markets.rs b/src/commands/markets.rs index 68e5491..d3ee17f 100644 --- a/src/commands/markets.rs +++ b/src/commands/markets.rs @@ -95,7 +95,7 @@ pub async fn execute( .maybe_closed(resolved_closed) .maybe_offset(offset) .maybe_order(order) - .maybe_ascending(if ascending { Some(true) } else { None }) + .maybe_ascending(Some(ascending)) .build(); let markets = client.markets(&request).await?; diff --git a/src/commands/series.rs b/src/commands/series.rs index 11dba91..e4d8bdf 100644 --- a/src/commands/series.rs +++ b/src/commands/series.rs @@ -59,7 +59,7 @@ pub async fn execute(client: &gamma::Client, args: SeriesArgs, output: OutputFor .limit(limit) .maybe_offset(offset) .maybe_order(order) - .maybe_ascending(if ascending { Some(true) } else { None }) + .maybe_ascending(Some(ascending)) .maybe_closed(closed) .build();