Skip to content

Conversation

@vilgotf
Copy link
Member

@vilgotf vilgotf commented Aug 12, 2021

Discord recommends explicitly stating the encoding.

Copy link
Contributor

@spring4175 spring4175 left a 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

Copy link
Contributor

@7596ff 7596ff left a 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

@7596ff 7596ff added c-gateway Affects the gateway crate c-http Affects the http crate t-chore labels Aug 14, 2021
7596ff
7596ff previously approved these changes Aug 14, 2021
@vilgotf vilgotf requested a review from spring4175 August 14, 2021 16:50
@spring4175 spring4175 requested a review from 7596ff August 17, 2021 16:29
@spring4175 spring4175 merged commit c123655 into twilight-rs:main Aug 17, 2021
@spring4175
Copy link
Contributor

Thanks

spring4175 added a commit that referenced this pull request Aug 18, 2021
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 <[email protected]>
@vilgotf vilgotf deleted the refactor/random-nits branch August 18, 2021 04:58
7596ff added a commit to 7596ff/twilight that referenced this pull request Aug 25, 2021
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 <[email protected]>
Co-authored-by: Zeyla Hellyer <[email protected]>
7596ff pushed a commit to 7596ff/twilight that referenced this pull request Aug 25, 2021
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 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

c-gateway Affects the gateway crate c-http Affects the http crate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants