Skip to content

Commit bd030d9

Browse files
GnomedDevmkrasnitski
authored andcommitted
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 95fa682 commit bd030d9

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
@@ -3764,9 +3764,6 @@ impl Http {
37643764
event_id: Option<ScheduledEventId>,
37653765
) -> Result<Invite> {
37663766
let (member_counts_str, expiration_str, event_id_str);
3767-
#[cfg(feature = "utils")]
3768-
let code = crate::utils::parse_invite(code);
3769-
37703767
let mut params = ArrayVec::<_, 3>::new();
37713768

37723769
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)