Skip to content

Commit

Permalink
Fix examples in bevy_reflect/README.md (#963)
Browse files Browse the repository at this point in the history
  • Loading branch information
toothbrush7777777 authored Dec 1, 2020
1 parent 4c1bc02 commit bc2f43c
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions crates/bevy_reflect/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ This crate enables you to dynamically interact with Rust types:
#[derive(Reflect)]
struct Foo {
a: u32,
b: Bar
b: Bar,
c: Vec<i32>,
d: Vec<Bar>,
}
Expand All @@ -31,14 +31,14 @@ struct Bar(String);
#[derive(Reflect)]
struct Baz {
value: f32,
};
}

// We will use this value to illustrate `bevy_reflect` features
let mut foo = Foo {
a: 1,
b: Bar("hello".to_string()),
c: vec![1, 2]
d: vec![Baz { value: 3.14 }]
c: vec![1, 2],
d: vec![Baz { value: 3.14 }],
};
```

Expand Down Expand Up @@ -163,4 +163,4 @@ The whole point of Rust is static safety! Why build something that makes it easy

* Some problems are inherently dynamic (scripting, some types of serialization / deserialization)
* Sometimes the dynamic way is easier
* Sometimes the dynamic way puts less burden on your users to derive a bunch of traits (this was a big motivator for the Bevy project)
* Sometimes the dynamic way puts less burden on your users to derive a bunch of traits (this was a big motivator for the Bevy project)

0 comments on commit bc2f43c

Please sign in to comment.