Skip to content
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

Split up gateway, fix a few clippy warnings #436

Merged
merged 3 commits into from
Nov 14, 2023
Merged

Conversation

bitfl0wer
Copy link
Member

As the title suggests, Gateway has been split up into several files, due to it being several hundred locs in length and, in my opinion, becoming difficult/frustrating to navigate.

I have also fixed 2 clippy warnings: I have refactored an if x.is_some()... { x.unwrap() } into the more idiomatic if let Some(y) = x ..., and I have removed the duplicate definition of NSFWLevel in types/invite.

Copy link
Member

@kozabrada123 kozabrada123 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I quite like this new structure, just see my comments for minor adjustments :)

src/gateway/events.rs Outdated Show resolved Hide resolved
src/gateway/mod.rs Outdated Show resolved Hide resolved
Delete events.rs

Unify import

Move HEARTBEAT_ACK_TIMEOUT since its not an OPCODE
@bitfl0wer bitfl0wer merged commit 5676098 into dev Nov 14, 2023
3 checks passed
@bitfl0wer bitfl0wer deleted the refactor/split-gateway branch November 14, 2023 15:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants