Skip to content

Commit 50dc57c

Browse files
committed
cargo fmt
1 parent e77a120 commit 50dc57c

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

src/native/event_hub.rs

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,7 @@ impl EventHub {
7777

7878
{
7979
let mut listeners = self.listeners.write().unwrap();
80-
let event_listeners = listeners
81-
.entry(event_id.clone())
82-
.or_default();
80+
let event_listeners = listeners.entry(event_id.clone()).or_default();
8381
event_listeners.insert(callback_name, callback);
8482
}
8583

@@ -145,7 +143,10 @@ impl EventHub {
145143
let all_listeners = self.all_listeners.read().unwrap();
146144
for callback in all_listeners.iter() {
147145
// Create minimal tuple for global listeners: (event_id, args)
148-
let global_args = (event_id.to_string().into_pyobject(py).unwrap(), args.clone_ref(py));
146+
let global_args = (
147+
event_id.to_string().into_pyobject(py).unwrap(),
148+
args.clone_ref(py),
149+
);
149150

150151
if let Err(e) = callback.call1(py, global_args) {
151152
// Check if we should raise exceptions based on config._raise
@@ -269,7 +270,10 @@ impl EventHub {
269270
{
270271
let all_listeners = self.all_listeners.read().unwrap();
271272
for (idx, callback) in all_listeners.iter().enumerate() {
272-
let global_args = (event_id.to_string().into_pyobject(py).unwrap(), args.clone_ref(py));
273+
let global_args = (
274+
event_id.to_string().into_pyobject(py).unwrap(),
275+
args.clone_ref(py),
276+
);
273277
let listener_name = format!("__global_listener_{}", idx);
274278

275279
let result = match callback.call1(py, global_args) {

0 commit comments

Comments
 (0)