Skip to content

Commit b9a7556

Browse files
committed
doc: Remove comment on panic.
Accepts Option<&T>. Should not panic if component is not available.
1 parent d9780b5 commit b9a7556

File tree

1 file changed

+0
-6
lines changed
  • crates/bevy_mod_scripting_core/src/bindings

1 file changed

+0
-6
lines changed

crates/bevy_mod_scripting_core/src/bindings/world.rs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -283,9 +283,6 @@ impl<'w> WorldAccessGuard<'w> {
283283
}
284284

285285
/// Safely accesses the component by claiming and releasing access to it.
286-
///
287-
/// # Panics
288-
/// - if the component does not exist
289286
pub fn with_component<F, T, O>(&self, entity: Entity, f: F) -> Result<O, InteropError>
290287
where
291288
T: Component,
@@ -305,9 +302,6 @@ impl<'w> WorldAccessGuard<'w> {
305302
}
306303

307304
/// Safely accesses the component by claiming and releasing access to it.
308-
///
309-
/// # Panics
310-
/// - if the component does not exist
311305
pub fn with_component_mut<F, T, O>(&self, entity: Entity, f: F) -> Result<O, InteropError>
312306
where
313307
T: Component,

0 commit comments

Comments
 (0)