Skip to content

Commit

Permalink
Remove temporary Vec usage in the http module (serenity-rs#2624, s…
Browse files Browse the repository at this point in the history
…erenity-rs#2646)

This avoids having to allocate to store fixed length (replaced with normal
array) or fixed capacity (replaced with `ArrayVec`) collections as vectors for
the purposes of putting them through the `Request` plumbing.

Slight behavioral change - before, setting `params` to `Some(vec![])`
would still append a question mark to the end of the url. Now, we check
if the params array `is_empty` instead of `is_some`, so the question
mark won't be appended if the params list is empty.

Co-authored-by: Michael Krasnitski <[email protected]>
  • Loading branch information
2 people authored and arqunis committed Jan 16, 2025
1 parent 5f2133e commit 89bbb1d
Show file tree
Hide file tree
Showing 3 changed files with 272 additions and 227 deletions.
Loading

0 comments on commit 89bbb1d

Please sign in to comment.