-
-
Notifications
You must be signed in to change notification settings - Fork 134
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore(gateway, http): small code nits #1103
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR. Just documentation nits. I would appreciate it if the explicit encoding string addition would be a different PR though
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This and the vec![]
note and it seems good to go
Thanks |
Additions Add 6 new HTTP API error codes: - 10049: Unknown stream - 10050: Unknown premium server subscribe cooldown - 10070: Unknown Guild Scheduled Event - 10071: Unknown Guild Scheduled Event User - 50095: This server is not available in your location - 50097: This server needs monetization enabled in order to perform this action ([#1094] - [@Erk-]). Fixes Fix `ResponseFuture` returning mismatched `RequestTimedOut` and `RequestError` error type variants ([#1100] - [@vilgotf]). Enhancements Improve the performance of `Response::bytes` ([#1103] - [@vilgotf]). Add `[#must_use]` to typed HTTP request builders ([#1099] - [@zeylahellyer]). [@Erk-]: https://github.com/Erk- [@vilgotf]: https://github.com/vilgotf [@zeylahellyer]: https://github.com/zeylahellyer [#1103]: #1103 [#1100]: #1100 [#1099]: #1099 [#1094]: #1094 Signed-off-by: Zeyla Hellyer <zeyla@hellyer.dev>
Perform a few nits on the codebase: - **gateway**: in `Shard::start` use `str::to_string` over a cloned `Box<str>::into_string` - **gateway**: in `Shard::start` internally document authenticated bot information retrieval - **gateway**: in `ShardProcessor::new` explicitly pass the encoding - **gateway**: in `ShardProcessor::run` use `if let` instead of `match` - **http**: in `Response::bytes` use `vec!` for performance Co-authored-by: Cassandra McCarthy <cassie@7596ff.com> Co-authored-by: Zeyla Hellyer <zeyla@hellyer.dev>
Additions Add 6 new HTTP API error codes: - 10049: Unknown stream - 10050: Unknown premium server subscribe cooldown - 10070: Unknown Guild Scheduled Event - 10071: Unknown Guild Scheduled Event User - 50095: This server is not available in your location - 50097: This server needs monetization enabled in order to perform this action ([twilight-rs#1094] - [@Erk-]). Fixes Fix `ResponseFuture` returning mismatched `RequestTimedOut` and `RequestError` error type variants ([twilight-rs#1100] - [@vilgotf]). Enhancements Improve the performance of `Response::bytes` ([twilight-rs#1103] - [@vilgotf]). Add `[#must_use]` to typed HTTP request builders ([twilight-rs#1099] - [@zeylahellyer]). [@Erk-]: https://github.com/Erk- [@vilgotf]: https://github.com/vilgotf [@zeylahellyer]: https://github.com/zeylahellyer [twilight-rs#1103]: twilight-rs#1103 [twilight-rs#1100]: twilight-rs#1100 [twilight-rs#1099]: twilight-rs#1099 [twilight-rs#1094]: twilight-rs#1094 Signed-off-by: Zeyla Hellyer <zeyla@hellyer.dev>
Discord recommends explicitly stating the encoding.