Skip to content

Commit

Permalink
use .copied() instead of ?
Browse files Browse the repository at this point in the history
  • Loading branch information
JoJoJet committed Nov 25, 2022
1 parent e0862a5 commit 54abe7f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crates/bevy_reflect/src/impls/std.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1117,7 +1117,7 @@ impl GetTypeRegistration for &'static Path {

impl FromReflect for &'static Path {
fn from_reflect(reflect: &dyn crate::Reflect) -> Option<Self> {
Some(*reflect.as_any().downcast_ref::<Self>()?)
reflect.as_any().downcast_ref::<Self>().copied()
}
}

Expand Down

0 comments on commit 54abe7f

Please sign in to comment.