feat: make Channel::server return a reference

This commit is contained in:
Zomatree
2025-02-07 21:35:51 +00:00
parent 2593a4272b
commit 060b4c43f4
7 changed files with 12 additions and 12 deletions

View File

@@ -435,9 +435,9 @@ impl Channel {
}
/// Clone this channel's server id
pub fn server(&self) -> Option<String> {
pub fn server(&self) -> Option<&str> {
match self {
Channel::TextChannel { server, .. } | Channel::VoiceChannel { server, .. } => Some(server.clone()),
Channel::TextChannel { server, .. } | Channel::VoiceChannel { server, .. } => Some(server),
_ => None
}
}