Skip to content

Commit d5304dc

Browse files
update comment
1 parent 1ebe009 commit d5304dc

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

crates/bevy_ecs/src/error/handler.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ mod global_error_handler {
8686
/// currently have a way to express atomic function pointers.
8787
/// Should we add support for a platform on which function pointers and data pointers
8888
/// have different sizes, the transmutation back will fail to compile. In that case,
89-
/// we can replace the atomic pointer with a regular pointer protected by a `RwLock`
89+
/// we can replace the atomic pointer with a regular pointer protected by a `OnceLock`
9090
/// on only those platforms.
9191
/// SAFETY: Only accessible from within this module.
9292
static HANDLER: AtomicPtr<()> = AtomicPtr::new(panic as *mut ());

crates/bevy_ecs/src/error/mod.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
//! context surrounding the error – such as the system's [`name`] – in your error messages.
3636
//!
3737
//! ```rust, ignore
38-
//! use bevy_ecs::error::{set_global_error_handler, BevyError, ErrorContext};
38+
//! use bevy_ecs::error::{set_global_default_error_handler, BevyError, ErrorContext};
3939
//! use log::trace;
4040
//!
4141
//! fn my_error_handler(error: BevyError, ctx: ErrorContext) {
@@ -47,7 +47,7 @@
4747
//! }
4848
//!
4949
//! fn main() {
50-
//! set_global_error_handler(my_error_handler);
50+
//! set_global_default_error_handler(my_error_handler);
5151
//!
5252
//! // Initialize your Bevy App here
5353
//! }

0 commit comments

Comments
 (0)