Run cargo fmt
This commit is contained in:
parent
02bfd3ed3d
commit
bd874e6212
4 changed files with 13 additions and 5 deletions
|
|
@ -209,7 +209,9 @@ impl Room {
|
||||||
|
|
||||||
async fn on_packet(&mut self, packet: ParsedPacket) {
|
async fn on_packet(&mut self, packet: ParsedPacket) {
|
||||||
let room_name = &self.instance.config().room;
|
let room_name = &self.instance.config().room;
|
||||||
let Ok(data) = &packet.content else { return; };
|
let Ok(data) = &packet.content else {
|
||||||
|
return;
|
||||||
|
};
|
||||||
match data {
|
match data {
|
||||||
Data::BounceEvent(_) => {}
|
Data::BounceEvent(_) => {}
|
||||||
Data::DisconnectEvent(_) => {}
|
Data::DisconnectEvent(_) => {}
|
||||||
|
|
|
||||||
|
|
@ -130,7 +130,9 @@ impl Ui {
|
||||||
lock: Weak<FairMutex<()>>,
|
lock: Weak<FairMutex<()>>,
|
||||||
) -> crossterm::Result<()> {
|
) -> crossterm::Result<()> {
|
||||||
loop {
|
loop {
|
||||||
let Some(lock) = lock.upgrade() else { return Ok(()); };
|
let Some(lock) = lock.upgrade() else {
|
||||||
|
return Ok(());
|
||||||
|
};
|
||||||
let _guard = lock.lock();
|
let _guard = lock.lock();
|
||||||
if crossterm::event::poll(Self::POLL_DURATION)? {
|
if crossterm::event::poll(Self::POLL_DURATION)? {
|
||||||
let event = crossterm::event::read()?;
|
let event = crossterm::event::read()?;
|
||||||
|
|
|
||||||
|
|
@ -274,7 +274,9 @@ where
|
||||||
}
|
}
|
||||||
|
|
||||||
async fn root_id(&self, id: &TreeBlockId<M::Id>) -> Result<Option<M::Id>, S::Error> {
|
async fn root_id(&self, id: &TreeBlockId<M::Id>) -> Result<Option<M::Id>, S::Error> {
|
||||||
let Some(id) = id.any_id() else { return Ok(None); };
|
let Some(id) = id.any_id() else {
|
||||||
|
return Ok(None);
|
||||||
|
};
|
||||||
let path = self.store.path(id).await?;
|
let path = self.store.path(id).await?;
|
||||||
Ok(Some(path.into_first()))
|
Ok(Some(path.into_first()))
|
||||||
}
|
}
|
||||||
|
|
@ -480,7 +482,7 @@ where
|
||||||
async fn expand_bottom(&mut self) -> Result<(), Self::Error> {
|
async fn expand_bottom(&mut self) -> Result<(), Self::Error> {
|
||||||
let Some(bottom_root_id) = &self.bottom_root_id else {
|
let Some(bottom_root_id) = &self.bottom_root_id else {
|
||||||
self.blocks.end_bottom();
|
self.blocks.end_bottom();
|
||||||
return Ok(())
|
return Ok(());
|
||||||
};
|
};
|
||||||
|
|
||||||
let next_root_id = self.store.next_root_id(bottom_root_id).await?;
|
let next_root_id = self.store.next_root_id(bottom_root_id).await?;
|
||||||
|
|
|
||||||
|
|
@ -554,7 +554,9 @@ impl Rooms {
|
||||||
|
|
||||||
pub async fn handle_euph_event(&mut self, event: Event) -> bool {
|
pub async fn handle_euph_event(&mut self, event: Event) -> bool {
|
||||||
let room_name = event.config().room.clone();
|
let room_name = event.config().room.clone();
|
||||||
let Some(room) = self.euph_rooms.get_mut(&room_name) else { return false; };
|
let Some(room) = self.euph_rooms.get_mut(&room_name) else {
|
||||||
|
return false;
|
||||||
|
};
|
||||||
|
|
||||||
let handled = room.handle_event(event).await;
|
let handled = room.handle_event(event).await;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue