Skip to content

Commit

Permalink
use query string helper
Browse files Browse the repository at this point in the history
  • Loading branch information
suneettipirneni committed Jun 1, 2024
1 parent d3373f3 commit dd9d244
Showing 1 changed file with 3 additions and 12 deletions.
15 changes: 3 additions & 12 deletions twilight-http/src/routing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1835,18 +1835,9 @@ impl Display for Route<'_> {
Display::fmt(answer_id, f)?;
f.write_str("?")?;

if let Some(after) = after {
f.write_str("after=")?;
Display::fmt(after, f)?;
f.write_str("&")?;
}

if let Some(limit) = limit {
f.write_str("limit=")?;
Display::fmt(limit, f)?;
}

Ok(())
let mut writer = QueryStringFormatter::new(f);
writer.write_opt_param("after", after.as_ref())?;
writer.write_opt_param("limit", limit.as_ref())
}
Route::GetGlobalCommands {
application_id,
Expand Down

0 comments on commit dd9d244

Please sign in to comment.