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

Avoid cloning member out of cache in Guild::member #1934

Merged
merged 2 commits into from
Jun 4, 2022

Conversation

GnomedDev
Copy link
Member

Uses std::borrow::Cow to avoid cloning the member out of the members hashmap. This is not possible for GuildId::member or Cache::member because it would be returning a reference into the GuildRef which would be dropped at the end of the function.

@github-actions github-actions bot added the model Related to the `model` module. label Jun 3, 2022
@arqunis arqunis added enhancement An improvement to Serenity. breaking change The public API is changed, resulting in miscompilations or unexpected new behaviour for users labels Jun 4, 2022
@arqunis arqunis merged commit 20ac0bb into serenity-rs:next Jun 4, 2022
nickelc pushed a commit to nickelc/serenity that referenced this pull request Jun 11, 2022
nickelc pushed a commit to nickelc/serenity that referenced this pull request Jun 17, 2022
arqunis pushed a commit to arqunis/serenity that referenced this pull request Jul 20, 2022
arqunis pushed a commit to arqunis/serenity that referenced this pull request Aug 21, 2022
arqunis pushed a commit to arqunis/serenity that referenced this pull request Sep 2, 2022
kangalio pushed a commit to kangalio/serenity that referenced this pull request Sep 11, 2022
mkrasnitski pushed a commit to mkrasnitski/serenity that referenced this pull request Oct 1, 2022
mkrasnitski pushed a commit to mkrasnitski/serenity that referenced this pull request Nov 7, 2022
arqunis pushed a commit to arqunis/serenity that referenced this pull request Nov 13, 2022
mkrasnitski pushed a commit to mkrasnitski/serenity that referenced this pull request Feb 28, 2023
mkrasnitski pushed a commit to mkrasnitski/serenity that referenced this pull request May 18, 2023
mkrasnitski pushed a commit to mkrasnitski/serenity that referenced this pull request May 30, 2023
mkrasnitski pushed a commit to mkrasnitski/serenity that referenced this pull request Sep 21, 2023
mkrasnitski pushed a commit to mkrasnitski/serenity that referenced this pull request Oct 17, 2023
mkrasnitski pushed a commit to mkrasnitski/serenity that referenced this pull request Oct 24, 2023
arqunis pushed a commit to arqunis/serenity that referenced this pull request Oct 24, 2023
arqunis pushed a commit to arqunis/serenity that referenced this pull request Oct 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking change The public API is changed, resulting in miscompilations or unexpected new behaviour for users enhancement An improvement to Serenity. model Related to the `model` module.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants