Skip to content

Commit 86cc02d

Browse files
authored
Fix macro pollution in SystemParam derive (#19155)
# Objective Fixes #19130 ## Solution Fully quality `Result::Ok` so as to not accidentally invoke the anyhow function of the same name ## Testing Tested on this minimal repro with and without change. main.rs ```rs use anyhow::Ok; use bevy::ecs::system::SystemParam; #[derive(SystemParam)] pub struct SomeParams; fn main() { } ``` Cargo.toml ```toml [package] name = "bevy-playground" version = "0.1.0" edition = "2024" [dependencies] anyhow = "1.0.98" bevy = { path = "../bevy" } ```
1 parent 95470df commit 86cc02d

File tree

1 file changed

+1
-1
lines changed
  • crates/bevy_ecs/macros/src

1 file changed

+1
-1
lines changed

crates/bevy_ecs/macros/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -455,7 +455,7 @@ pub fn derive_system_param(input: TokenStream) -> TokenStream {
455455
<#field_types as #path::system::SystemParam>::validate_param(#field_locals, _system_meta, _world)
456456
.map_err(|err| #path::system::SystemParamValidationError::new::<Self>(err.skipped, #field_messages, #field_names))?;
457457
)*
458-
Ok(())
458+
Result::Ok(())
459459
}
460460

461461
#[inline]

0 commit comments

Comments
 (0)