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

refactor(model, cache): a full message object for MessageUpdate event #2387

Merged
merged 7 commits into from
Nov 25, 2024

Conversation

BooTheDev
Copy link
Contributor

MessageUpdate event now contains a full Message object.

Refs:

@github-actions github-actions bot added c-cache Affects the cache crate c-model Affects the model crate t-refactor Refactors APIs or code. labels Nov 23, 2024
Copy link
Member

@Erk- Erk- left a comment

Choose a reason for hiding this comment

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

Just a single line, otherwise the PR looks good to go.

Comment on lines +8 to +19
impl Deref for MessageUpdate {
type Target = Message;

fn deref(&self) -> &Self::Target {
&self.0
}
}

impl DerefMut for MessageUpdate {
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.0
}
Copy link
Member

Choose a reason for hiding this comment

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

There is a discussion to have about if we should have these implementations, but that should probably be delegated to its own discussion because we have it multiple places.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I see. So, this is good for now until we make decisions about these implementations.

twilight-cache-inmemory/src/event/message.rs Outdated Show resolved Hide resolved
@itohatweb itohatweb enabled auto-merge (squash) November 25, 2024 13:34
@itohatweb itohatweb merged commit f7a6c3e into twilight-rs:main Nov 25, 2024
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c-cache Affects the cache crate c-model Affects the model crate t-refactor Refactors APIs or code.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants