diff --git a/src/commands/comments.rs b/src/commands/comments.rs index 4003911..53f8bb6 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) - .ascending(ascending) + .maybe_ascending(if ascending { Some(true) } else { None }) .build(); let comments = client.comments(&request).await?; @@ -142,7 +142,7 @@ pub async fn execute( .limit(limit) .maybe_offset(offset) .maybe_order(order) - .ascending(ascending) + .maybe_ascending(if ascending { Some(true) } else { None }) .build(); let comments = client.comments_by_user_address(&request).await?; diff --git a/src/commands/events.rs b/src/commands/events.rs index d001210..676802e 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) - .ascending(ascending) + .maybe_ascending(if ascending { Some(true) } else { None }) .maybe_tag_slug(tag) // EventsRequest::order is Vec; into_iter on Option yields 0 or 1 items. .order(order.into_iter().collect()) diff --git a/src/commands/markets.rs b/src/commands/markets.rs index 2544d18..1cd7cb8 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) - .ascending(ascending) + .maybe_ascending(if ascending { Some(true) } else { None }) .build(); let markets = client.markets(&request).await?; diff --git a/src/commands/series.rs b/src/commands/series.rs index fc5e884..7d69676 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) - .ascending(ascending) + .maybe_ascending(if ascending { Some(true) } else { None }) .maybe_closed(closed) .build(); diff --git a/src/commands/sports.rs b/src/commands/sports.rs index 0782fd1..1b0d6e9 100644 --- a/src/commands/sports.rs +++ b/src/commands/sports.rs @@ -66,7 +66,7 @@ pub async fn execute(client: &gamma::Client, args: SportsArgs, output: OutputFor .limit(limit) .maybe_offset(offset) .maybe_order(order) - .ascending(ascending) + .maybe_ascending(if ascending { Some(true) } else { None }) .league(league.into_iter().collect()) .build(); diff --git a/src/commands/tags.rs b/src/commands/tags.rs index 64aae6a..2ce338e 100644 --- a/src/commands/tags.rs +++ b/src/commands/tags.rs @@ -72,7 +72,7 @@ pub async fn execute(client: &gamma::Client, args: TagsArgs, output: OutputForma let request = TagsRequest::builder() .limit(limit) .maybe_offset(offset) - .ascending(ascending) + .maybe_ascending(if ascending { Some(true) } else { None }) .build(); let tags = client.tags(&request).await?;