fix(desktop): extract ObserverFn type alias to appease clippy::type_complexity

The thread_local OBSERVER field had an inline complex type that triggered
-D clippy::type_complexity on the push hook. Extract it to a type alias.

Co-authored-by: Will Pfleger <pfleger.will@gmail.com>
Signed-off-by: Will Pfleger <pfleger.will@gmail.com>
This commit is contained in:
Duncan
2026-08-05 17:36:57 -04:00
co-authored by Will Pfleger
parent 8a5748601c
commit 342aaf43d3
@@ -360,8 +360,10 @@ pub(crate) async fn scoped_archive_operation(
pub(crate) mod test_hooks {
use std::{cell::RefCell, sync::Arc};
type ObserverFn = Arc<dyn Fn(&nostr::Event) + Send + Sync>;
thread_local! {
static OBSERVER: RefCell<Option<Arc<dyn Fn(&nostr::Event) + Send + Sync>>> =
static OBSERVER: RefCell<Option<ObserverFn>> =
const { RefCell::new(None) };
static ATTEMPT_COUNT: RefCell<u32> = const { RefCell::new(0) };
}