From 253db50c63a236e7928f6dc83e99843d4edc8f68 Mon Sep 17 00:00:00 2001 From: fren_gor Date: Sat, 1 Apr 2023 05:01:44 +0200 Subject: [PATCH] Fix typo in bevy_reflect README (#8281) # Objective Fix typo in bevy_reflect README: `MyType` is a struct and not a trait, so `&dyn MyType` is incorrect. ## Solution Replace `&dyn MyType` with `&dyn DoThing` --- crates/bevy_reflect/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/bevy_reflect/README.md b/crates/bevy_reflect/README.md index c9c4783cf31ae..23344dedc2322 100644 --- a/crates/bevy_reflect/README.md +++ b/crates/bevy_reflect/README.md @@ -153,8 +153,8 @@ let my_trait: &dyn DoThing = reflect_do_thing.get(&*reflect_value).unwrap(); println!("{}", my_trait.do_thing()); // This works because the #[reflect(MyTrait)] we put on MyType informed the Reflect derive to insert a new instance -// of ReflectDoThing into MyType's registration. The instance knows how to cast &dyn Reflect to &dyn MyType, because it -// knows that &dyn Reflect should first be downcasted to &MyType, which can then be safely casted to &dyn MyType +// of ReflectDoThing into MyType's registration. The instance knows how to cast &dyn Reflect to &dyn DoThing, because it +// knows that &dyn Reflect should first be downcasted to &MyType, which can then be safely casted to &dyn DoThing ``` ## Why make this?