Skip to content

Commit eb44c20

Browse files
committed
replace maybe_ascending with ascending
1 parent 47f8386 commit eb44c20

6 files changed

Lines changed: 7 additions & 7 deletions

File tree

src/commands/comments.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ pub async fn execute(
112112
.limit(limit)
113113
.maybe_offset(offset)
114114
.maybe_order(order)
115-
.maybe_ascending(ascending.then_some(true))
115+
.ascending(ascending)
116116
.build();
117117

118118
let comments = client.comments(&request).await?;
@@ -142,7 +142,7 @@ pub async fn execute(
142142
.limit(limit)
143143
.maybe_offset(offset)
144144
.maybe_order(order)
145-
.maybe_ascending(ascending.then_some(true))
145+
.ascending(ascending)
146146
.build();
147147

148148
let comments = client.comments_by_user_address(&request).await?;

src/commands/events.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ pub async fn execute(client: &gamma::Client, args: EventsArgs, output: OutputFor
7979
.limit(limit)
8080
.maybe_closed(resolved_closed)
8181
.maybe_offset(offset)
82-
.maybe_ascending(ascending.then_some(true))
82+
.ascending(ascending)
8383
.maybe_tag_slug(tag)
8484
// EventsRequest::order is Vec<String>; into_iter on Option yields 0 or 1 items.
8585
.order(order.into_iter().collect())

src/commands/markets.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ pub async fn execute(
9595
.maybe_closed(resolved_closed)
9696
.maybe_offset(offset)
9797
.maybe_order(order)
98-
.maybe_ascending(ascending.then_some(true))
98+
.ascending(ascending)
9999
.build();
100100

101101
let markets = client.markets(&request).await?;

src/commands/series.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ pub async fn execute(client: &gamma::Client, args: SeriesArgs, output: OutputFor
5959
.limit(limit)
6060
.maybe_offset(offset)
6161
.maybe_order(order)
62-
.maybe_ascending(ascending.then_some(true))
62+
.ascending(ascending)
6363
.maybe_closed(closed)
6464
.build();
6565

src/commands/sports.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ pub async fn execute(client: &gamma::Client, args: SportsArgs, output: OutputFor
6666
.limit(limit)
6767
.maybe_offset(offset)
6868
.maybe_order(order)
69-
.maybe_ascending(ascending.then_some(true))
69+
.ascending(ascending)
7070
.league(league.into_iter().collect())
7171
.build();
7272

src/commands/tags.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ pub async fn execute(client: &gamma::Client, args: TagsArgs, output: OutputForma
7272
let request = TagsRequest::builder()
7373
.limit(limit)
7474
.maybe_offset(offset)
75-
.maybe_ascending(ascending.then_some(true))
75+
.ascending(ascending)
7676
.build();
7777

7878
let tags = client.tags(&request).await?;

0 commit comments

Comments
 (0)