Skip to content

Commit

Permalink
Switched to Vec::new for the builder to mirror Serenity's builder pat…
Browse files Browse the repository at this point in the history
…tern
  • Loading branch information
TapGhoul committed Sep 11, 2024
1 parent 7efd3f6 commit 42f6823
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/reply/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ impl CreateReply {
/// Existing embeds on this are kept.
/// When editing a message, this will overwrite previously sent embeds.
pub fn embed(mut self, embed: serenity::CreateEmbed) -> Self {
self.embeds.get_or_insert_with(|| Default::default()).push(embed);
self.embeds.get_or_insert_with(Vec::new).push(embed);
self
}

Expand Down

0 comments on commit 42f6823

Please sign in to comment.