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 <42564254+mkrasnitski@users.noreply.github.com>
  • Loading branch information
GnomedDev and mkrasnitski committed Mar 19, 2024
1 parent 5f2037d commit d92b9eb
Show file tree
Hide file tree
Showing 3 changed files with 255 additions and 210 deletions.
Loading

0 comments on commit d92b9eb

Please sign in to comment.