Skip to content

Commit

Permalink
fix: compile with --no-default-features
Browse files Browse the repository at this point in the history
this fixes the PR comment:
#3206 (comment)
  • Loading branch information
iamlockon committed Feb 18, 2025
1 parent 955d36a commit 2c44cd0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tracing-core/src/spin/once.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ impl<T> Once<T> {
}

fn force_get<'a>(&'a self) -> &'a T {
unsafe { self.data.get().assume_init_ref() }
unsafe { (*self.data.get()).assume_init_ref() }
}

/// Performs an initialization routine once and only once. The given closure
Expand Down Expand Up @@ -90,7 +90,7 @@ impl<T> Once<T> {
panicked: true,
};
unsafe {
*self.data.get() = builder();
*self.data.get() = MaybeUninit::new(builder());
};
finish.panicked = false;

Expand Down

0 comments on commit 2c44cd0

Please sign in to comment.