pub fn remove_patch(self, channel: &mut Channel) {
        match self {
            Self::Description => match channel {
                Channel::Group(GroupChannel { description, .. })
                | Channel::TextChannel(TextChannel {
                    server_channel: ServerChannel { description, .. },
                    ..
                })
                | Channel::VoiceChannel(VoiceChannel {
                    server_channel: ServerChannel { description, .. },
                    ..
                }) => *description = None,
                Channel::SavedMessages { .. } | Channel::DirectMessage { .. } => {}
            },
            Self::Icon => match channel {
                Channel::Group(GroupChannel { icon, .. })
                | Channel::TextChannel(TextChannel {
                    server_channel: ServerChannel { icon, .. },
                    ..
                })
                | Channel::VoiceChannel(VoiceChannel {
                    server_channel: ServerChannel { icon, .. },
                    ..
                }) => *icon = None,
                Channel::SavedMessages { .. } | Channel::DirectMessage { .. } => {}
            },
        }
    }
/// Treats self as a patch and removes the field from the channel.
Treats self as a patch and removes the field from the channel.
Treats self as a patch and removes the field from the channel .
pub fn remove_patch(self, channel: &mut Channel) {
        match self {
            Self::Description => match channel {
                Channel::Group(GroupChannel { description, .. })
                | Channel::TextChannel(TextChannel {
                    server_channel: ServerChannel { description, .. },
                    ..
                })
                | Channel::VoiceChannel(VoiceChannel {
                    server_channel: ServerChannel { description, .. },
                    ..
                }) => *description = None,
                Channel::SavedMessages { .. } | Channel::DirectMessage { .. } => {}
            },
            Self::Icon => match channel {
                Channel::Group(GroupChannel { icon, .. })
                | Channel::TextChannel(TextChannel {
                    server_channel: ServerChannel { icon, .. },
                    ..
                })
                | Channel::VoiceChannel(VoiceChannel {
                    server_channel: ServerChannel { icon, .. },
                    ..
                }) => *icon = None,
                Channel::SavedMessages { .. } | Channel::DirectMessage { .. } => {}
            },
        }
    }
pub fn remove_patch ( self , channel : & mut Channel ) { match self { Self :: Description => match channel { Channel :: Group ( GroupChannel { description , .. } ) | Channel :: TextChannel ( TextChannel { server_channel : ServerChannel { description , .. } , .. } ) | Channel :: VoiceChannel ( VoiceChannel { server_channel : ServerChannel { description , .. } , .. } ) => * description = None , Channel :: SavedMessages { .. } | Channel :: DirectMessage { .. } => { } } , Self :: Icon => match channel { Channel :: Group ( GroupChannel { icon , .. } ) | Channel :: TextChannel ( TextChannel { server_channel : ServerChannel { icon , .. } , .. } ) | Channel :: VoiceChannel ( VoiceChannel { server_channel : ServerChannel { icon , .. } , .. } ) => * icon = None , Channel :: SavedMessages { .. } | Channel :: DirectMessage { .. } => { } } , } }
Treats self as a patch and removes the field from the channel.
Treats self as a patch and removes the field from the channel .
self
channel
&mut Channel
self
channel
&mut Channel