🚨 Fix some clippy warnings

This commit is contained in:
2024-05-26 11:53:47 +02:00
parent 62015f8d13
commit 89473cfd61
6 changed files with 11 additions and 0 deletions

View File

@@ -52,6 +52,7 @@ impl Account {
self.messaging_provider = Some(provider.clone()); self.messaging_provider = Some(provider.clone());
} }
#[allow(dead_code)]
pub fn get_room(&self, room_id: &RoomId) -> Option<Rc<Room>> { pub fn get_room(&self, room_id: &RoomId) -> Option<Rc<Room>> {
self.by_id_rooms.borrow().get(room_id).cloned() self.by_id_rooms.borrow().get(room_id).cloned()
} }

View File

@@ -118,6 +118,7 @@ impl Room {
&self.id &self.id
} }
#[allow(dead_code)]
pub fn name(&self) -> Option<String> { pub fn name(&self) -> Option<String> {
self.name.borrow().clone() self.name.borrow().clone()
} }

View File

@@ -65,6 +65,7 @@ impl Space {
&self.id &self.id
} }
#[allow(dead_code)]
pub fn name(&self) -> Option<String> { pub fn name(&self) -> Option<String> {
self.name.borrow().clone() self.name.borrow().clone()
} }

View File

@@ -28,7 +28,10 @@ pub trait RoomStoreConsumerInterface {
fn id(&self) -> &RoomId; fn id(&self) -> &RoomId;
fn is_direct(&self) -> Option<bool>; fn is_direct(&self) -> Option<bool>;
fn name(&self) -> Option<String>; fn name(&self) -> Option<String>;
#[allow(dead_code)]
async fn avatar(&self) -> Option<Avatar>; async fn avatar(&self) -> Option<Avatar>;
fn spaces(&self) -> &Vec<SpaceId>; fn spaces(&self) -> &Vec<SpaceId>;
} }

View File

@@ -30,6 +30,8 @@ pub struct Store {
#[derive(Clone)] #[derive(Clone)]
pub struct Room { pub struct Room {
store: RefCell<Store>, store: RefCell<Store>,
#[allow(dead_code)]
domain: Rc<dyn RoomStoreConsumerInterface>, domain: Rc<dyn RoomStoreConsumerInterface>,
} }
@@ -52,6 +54,7 @@ impl Room {
} }
} }
#[allow(dead_code)]
pub async fn get_avatar(&self) -> Option<Avatar> { pub async fn get_avatar(&self) -> Option<Avatar> {
self.domain.avatar().await self.domain.avatar().await
} }

View File

@@ -20,6 +20,8 @@ pub struct Store {
#[derive(Clone)] #[derive(Clone)]
pub struct Space { pub struct Space {
store: RefCell<Store>, store: RefCell<Store>,
#[allow(dead_code)]
domain: Rc<dyn SpaceStoreConsumerInterface>, domain: Rc<dyn SpaceStoreConsumerInterface>,
} }