Skip to content

Commit

Permalink
refactor: remove element_id from flush_callbacks
Browse files Browse the repository at this point in the history
  • Loading branch information
Stumblinbear committed Jan 26, 2024
1 parent 590b2f5 commit 5dbaf00
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions crates/agui_core/src/engine/widgets/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,7 @@ where
level = "trace",
skip(self),
fields(
callback_id = field::Empty,
element_id = field::Empty,
callback_id = field::Empty
)
)]
pub fn flush_callbacks(&mut self) {
Expand All @@ -134,13 +133,12 @@ where
arg: callback_arg,
}) = self.callback_rx.try_recv()
{
let element_id = callback_id.element_id();

if tracing::span_enabled!(tracing::Level::TRACE) {
span.record("callback_id", format!("{:?}", callback_id));
span.record("element_id", format!("{:?}", element_id));
}

let element_id = callback_id.element_id();

let existed = self
.tree
.with(element_id, |tree, element| {
Expand Down

0 comments on commit 5dbaf00

Please sign in to comment.