From 6a87b9c98f76d0e38ab64d163420489aa95b53d5 Mon Sep 17 00:00:00 2001 From: Mike Dilger Date: Thu, 4 Jul 2024 10:23:22 +1200 Subject: [PATCH] cargo fmt --- gossip-bin/src/ui/mod.rs | 8 ++++---- gossip-lib/src/tasks.rs | 9 +++++---- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/gossip-bin/src/ui/mod.rs b/gossip-bin/src/ui/mod.rs index 9f82cdb8..1356c8d2 100644 --- a/gossip-bin/src/ui/mod.rs +++ b/gossip-bin/src/ui/mod.rs @@ -1056,10 +1056,10 @@ impl GossipUi { let where_to_put_background = ui.painter().add(egui::Shape::Noop); let pos = response.rect.right_center() + vec2(10.0, 1.0); let text_color = if self.theme.dark_mode { - self.theme.neutral_900() - } else { - self.theme.neutral_100() - }; + self.theme.neutral_900() + } else { + self.theme.neutral_100() + }; let bg_rect = ui .painter() .text( diff --git a/gossip-lib/src/tasks.rs b/gossip-lib/src/tasks.rs index 42a7fd49..e70bf89c 100644 --- a/gossip-lib/src/tasks.rs +++ b/gossip-lib/src/tasks.rs @@ -1,6 +1,6 @@ use crate::error::{Error, ErrorKind}; -use crate::GLOBALS; use crate::RunState; +use crate::GLOBALS; use std::sync::atomic::Ordering; use std::time::Duration; use tokio::time::Instant; @@ -29,7 +29,9 @@ pub(crate) fn start_background_tasks() { tick += 1; - if ! GLOBALS.storage.read_setting_offline() && *read_runstate.borrow() == RunState::Online { + if !GLOBALS.storage.read_setting_offline() + && *read_runstate.borrow() == RunState::Online + { if let Err(e) = do_online_tasks(tick).await { tracing::error!("{}", e); } @@ -56,7 +58,7 @@ async fn do_online_tasks(tick: usize) -> Result<(), Error> { // Update pending every 12 seconds if tick % 12 == 0 { if let Err(e) = GLOBALS.pending.compute_pending() { - if ! matches!(e.kind, ErrorKind::NoPrivateKey) { + if !matches!(e.kind, ErrorKind::NoPrivateKey) { tracing::error!("{:?}", e); } } @@ -71,7 +73,6 @@ async fn do_online_tasks(tick: usize) -> Result<(), Error> { } async fn do_general_tasks(tick: usize) -> Result<(), Error> { - // Update GLOBALS.unread_dms count (every 3 seconds) if tick % 3 == 0 { // Update unread dm channels, whether or not we are in that feed