Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasfernog-crabnebula committed Oct 2, 2024
1 parent 6efb9b8 commit d42fb90
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion crates/devtools-core/src/aggregator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ impl Aggregator {
} => {
self.logs.push_overwrite(LogEvent {
at: Some(self.base_time.to_timestamp(at)),
metadata_id: metadata as *const _ as u64,
metadata_id: std::ptr::from_ref(metadata) as u64,
message,
fields,
parent: maybe_parent.map(|id| id.into_u64()),
Expand Down
2 changes: 1 addition & 1 deletion crates/devtools-core/src/bridge_layer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ where
fn on_event(&self, event: &tracing_core::Event<'_>, _ctx: Context<'_, S>) {
let metadata = event.metadata();

let mut visitor = EventVisitor::new(metadata as *const _ as u64);
let mut visitor = EventVisitor::new(std::ptr::from_ref(metadata) as u64);
event.record(&mut visitor);
let (message, _fields) = visitor.result();

Expand Down
6 changes: 3 additions & 3 deletions crates/devtools-core/src/layer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ where
) {
let span = ctx.span(id).expect("Span not in context, probably a bug");
let metadata = span.metadata();
let mut visitor = FieldVisitor::new(metadata as *const _ as u64);
let mut visitor = FieldVisitor::new(std::ptr::from_ref(metadata) as u64);
values.record(&mut visitor);
let fields = visitor.result();

Expand All @@ -102,7 +102,7 @@ where
let metadata = span.metadata();
let maybe_parent = span.parent().map(|s| s.id());

let mut visitor = FieldVisitor::new(metadata as *const _ as u64);
let mut visitor = FieldVisitor::new(std::ptr::from_ref(metadata) as u64);
attrs.record(&mut visitor);
let fields = visitor.result();

Expand All @@ -125,7 +125,7 @@ where
});

self.send_event(&self.shared.dropped_log_events, || {
let mut visitor = EventVisitor::new(metadata as *const _ as u64);
let mut visitor = EventVisitor::new(std::ptr::from_ref(metadata) as u64);
event.record(&mut visitor);
let (message, fields) = visitor.result();

Expand Down

0 comments on commit d42fb90

Please sign in to comment.