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

refactor(model)!: stage discovery has been removed #1479

Merged
merged 1 commit into from
Jan 22, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion cache/in-memory/src/event/stage_instance.rs
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ mod tests {

let stage_instance = StageInstance {
channel_id: ChannelId::new(1).expect("non zero"),
discoverable_disabled: true,
guild_id: GuildId::new(2).expect("non zero"),
id: StageId::new(3).expect("non zero"),
privacy_level: PrivacyLevel::GuildOnly,
Expand Down
10 changes: 3 additions & 7 deletions model/src/channel/stage_instance/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ use serde::{Deserialize, Serialize};
#[derive(Clone, Debug, Deserialize, Eq, Hash, PartialEq, Serialize)]
pub struct StageInstance {
pub channel_id: ChannelId,
pub discoverable_disabled: bool,
pub guild_id: GuildId,
pub id: StageId,
pub privacy_level: PrivacyLevel,
Expand All @@ -25,10 +24,9 @@ mod test {
fn test_stage_instance() {
let value = StageInstance {
channel_id: ChannelId::new(100).expect("non zero"),
discoverable_disabled: false,
guild_id: GuildId::new(200).expect("non zero"),
id: StageId::new(300).expect("non zero"),
privacy_level: PrivacyLevel::Public,
privacy_level: PrivacyLevel::GuildOnly,
topic: "a topic".into(),
};

Expand All @@ -37,21 +35,19 @@ mod test {
&[
Token::Struct {
name: "StageInstance",
len: 6,
len: 5,
},
Token::Str("channel_id"),
Token::NewtypeStruct { name: "ChannelId" },
Token::Str("100"),
Token::Str("discoverable_disabled"),
Token::Bool(false),
Token::Str("guild_id"),
Token::NewtypeStruct { name: "GuildId" },
Token::Str("200"),
Token::Str("id"),
Token::NewtypeStruct { name: "StageId" },
Token::Str("300"),
Token::Str("privacy_level"),
Token::U8(1),
Token::U8(2),
Token::Str("topic"),
Token::Str("a topic"),
Token::StructEnd,
Expand Down
2 changes: 0 additions & 2 deletions model/src/channel/stage_instance/privacy_level.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ use serde_repr::{Deserialize_repr, Serialize_repr};
)]
#[repr(u8)]
pub enum PrivacyLevel {
Public = 1,
GuildOnly = 2,
}

Expand All @@ -16,7 +15,6 @@ mod tests {

#[test]
fn test_variants() {
serde_test::assert_tokens(&PrivacyLevel::Public, &[Token::U8(1)]);
serde_test::assert_tokens(&PrivacyLevel::GuildOnly, &[Token::U8(2)]);
}
}