-
Notifications
You must be signed in to change notification settings - Fork 637
Fix CacheUpdate implementations for extra FullEvents #3066
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
Conversation
|
Blocked on #3053 for now. Don't feel like fixing code that's gonna get removed anyways. |
7547066 to
2dd5053
Compare
2dd5053 to
f1b4e98
Compare
e758fa6 to
9f19cbd
Compare
3cfd9a1 to
faa1aad
Compare
|
Since this is blocked on another PR, I am changing to draft. |
1adb5d2 to
358336e
Compare
2358db3 to
8e06740
Compare
8e06740 to
cdd90ee
Compare
cdd90ee to
efa9d8f
Compare
efa9d8f to
b41e9b5
Compare
dc9f5ed to
bac40f2
Compare
bac40f2 to
7548f7a
Compare
7548f7a to
15311a8
Compare
15311a8 to
4f57503
Compare
4f57503 to
34ca24a
Compare
01c4aa8 to
2290a77
Compare
2290a77 to
ebb20c3
Compare
43f8581 to
5c04af3
Compare
52caf10 to
48997a1
Compare
48997a1 to
8abf7b2
Compare
GnomedDev
left a comment
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.
LGTM
| }, | ||
| Event::GuildDelete(mut event) => { | ||
| let full = if_cache!(event.update(cache)); | ||
| let full = if_cache!(update_cache!(cache, event)); |
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.
Why change this? I'm fine with merging as-is, just curious.
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.
Simply because update_cache! is used elsewhere in the file to do the same thing. Figured I'd make it consistent.
…y-rs#3066)" to restore compatibility with poise This reverts commit bf79aa9.
This reverts commits: e5a4c30 "Remove ArgumentConvert trait and implementations (serenity-rs#3053)" bf79aa9 "Fix CacheUpdate implementations for extra FullEvents (serenity-rs#3066)"
The gateway was generating extra FullEvents by directly inspecting the contents of the cache, however this functionality can be incorporated as part of the
CacheUpdateimplementation for those events. The main cache fields are also private now. The temp_cache fields could be made private too, but I'm unsure if it's worth it.