Skip to content

Commit

Permalink
refactor(model)!: remove IntegrationApplication summary
Browse files Browse the repository at this point in the history
Discord has removed the `summary` property from application objects. This is also the case for integration applications.

Reference: discord/discord-api-docs#4686
  • Loading branch information
itohatweb committed Apr 5, 2022
1 parent e058937 commit 733765d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 13 deletions.
5 changes: 1 addition & 4 deletions model/src/guild/integration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,6 @@ mod tests {
icon: None,
id: Id::new(123),
name: "Twilight".to_string(),
summary: "A cool pony".to_string(),
}),
enable_emoticons: Some(true),
enabled: true,
Expand Down Expand Up @@ -250,7 +249,7 @@ mod tests {
Token::Some,
Token::Struct {
name: "IntegrationApplication",
len: 5,
len: 4,
},
Token::Str("description"),
Token::Str("Friendship is Magic"),
Expand All @@ -261,8 +260,6 @@ mod tests {
Token::Str("123"),
Token::Str("name"),
Token::Str("Twilight"),
Token::Str("summary"),
Token::Str("A cool pony"),
Token::StructEnd,
Token::Str("enable_emoticons"),
Token::Some,
Expand Down
11 changes: 2 additions & 9 deletions model/src/guild/integration_application.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ pub struct IntegrationApplication {
pub icon: Option<ImageHash>,
pub id: Id<ApplicationMarker>,
pub name: String,
pub summary: String,
}

#[cfg(test)]
Expand All @@ -31,15 +30,14 @@ mod tests {
icon: None,
id: Id::new(123),
name: "Twilight".to_string(),
summary: "A cool pony".to_string(),
};

serde_test::assert_tokens(
&value,
&[
Token::Struct {
name: "IntegrationApplication",
len: 5,
len: 4,
},
Token::Str("description"),
Token::Str("Friendship is Magic"),
Expand All @@ -50,8 +48,6 @@ mod tests {
Token::Str("123"),
Token::Str("name"),
Token::Str("Twilight"),
Token::Str("summary"),
Token::Str("A cool pony"),
Token::StructEnd,
],
);
Expand Down Expand Up @@ -81,15 +77,14 @@ mod tests {
icon: None,
id: Id::new(123),
name: "Twilight".to_string(),
summary: "A cool pony".to_string(),
};

serde_test::assert_tokens(
&value,
&[
Token::Struct {
name: "IntegrationApplication",
len: 6,
len: 5,
},
Token::Str("bot"),
Token::Some,
Expand Down Expand Up @@ -122,8 +117,6 @@ mod tests {
Token::Str("123"),
Token::Str("name"),
Token::Str("Twilight"),
Token::Str("summary"),
Token::Str("A cool pony"),
Token::StructEnd,
],
);
Expand Down

0 comments on commit 733765d

Please sign in to comment.