only one place to 'calculate' the name

This commit is contained in:
2025-08-02 21:15:50 +02:00
parent 63a10d55fc
commit 33008e6b32
3 changed files with 41 additions and 49 deletions

View File

@@ -9,6 +9,12 @@ pub struct Client {
pub name: Option<String>,
}
impl PartialEq for Client {
fn eq(&self, other: &Self) -> bool {
self.uuid == other.uuid
}
}
impl Client {
pub(crate) fn get_display_name(&self) -> String {
match &self.name {