Skip to content

Commit 22eb841

Browse files
authored
Remove implicit invite parsing in Invite::get (#3118)
This was undocumented and done twice. Let's just get rid of it as users had to use the `serenity::util` function if they were following the documentation anyway.
1 parent db6b4d0 commit 22eb841

File tree

2 files changed

+1
-11
lines changed

2 files changed

+1
-11
lines changed

src/http/client.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3725,9 +3725,6 @@ impl Http {
37253725
event_id: Option<ScheduledEventId>,
37263726
) -> Result<Invite> {
37273727
let (member_counts_str, expiration_str, event_id_str);
3728-
#[cfg(feature = "utils")]
3729-
let code = crate::utils::parse_invite(code);
3730-
37313728
let mut params = ArrayVec::<_, 3>::new();
37323729

37333730
member_counts_str = member_counts.to_arraystring();

src/model/invite.rs

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -116,14 +116,7 @@ impl Invite {
116116
expiration: bool,
117117
event_id: Option<ScheduledEventId>,
118118
) -> Result<Invite> {
119-
let mut invite = code;
120-
121-
#[cfg(feature = "utils")]
122-
{
123-
invite = crate::utils::parse_invite(invite);
124-
}
125-
126-
http.get_invite(invite, member_counts, expiration, event_id).await
119+
http.get_invite(code, member_counts, expiration, event_id).await
127120
}
128121

129122
/// Returns a URL to use for the invite.

0 commit comments

Comments
 (0)