Skip to content

Commit

Permalink
update book
Browse files Browse the repository at this point in the history
  • Loading branch information
0x6273 committed Oct 16, 2019
1 parent 3fa53de commit 8656079
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion book/src/appendices/a_config_files/arena_config.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ use crate::config::ArenaConfig;
We'll need to load the config at startup, so let's add this to the `run` function in `main.rs`

```rust,ignore
let arena_config = ArenaConfig::load(&config);
let arena_config = ArenaConfig::load(&config)?;
```

Now that we have loaded our config, we want to add it to the world so other modules can access
Expand Down
4 changes: 2 additions & 2 deletions book/src/appendices/a_config_files/ball_config.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ use crate::config::PongConfig;
Now, modify the `run()` function, from

```rust,ignore
let arena_config = ArenaConfig::load(&config);
let arena_config = ArenaConfig::load(&config)?;
[..]
.with_bundle(PongBundle::default())?
[..]
Expand All @@ -109,7 +109,7 @@ let arena_config = ArenaConfig::load(&config);
to

```rust,ignore
let pong_config = PongConfig::load(&config);
let pong_config = PongConfig::load(&config)?;
[..]
.with_bundle(PongBundle::default())?
[..]
Expand Down
4 changes: 2 additions & 2 deletions book/src/pong-tutorial/pong-tutorial-03.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ let input_bundle = InputBundle::<StringBindings>::new()
.with_bindings_from_file(binding_path)?;
# let path = "./config/display.ron";
# let config = DisplayConfig::load(&path);
# let config = DisplayConfig::load(&path)?;
# let assets_dir = "assets";
# struct Pong;
# impl SimpleState for Pong { }
Expand Down Expand Up @@ -215,7 +215,7 @@ fn main() -> amethyst::Result<()> {
// --snip--
# let path = "./config/display.ron";
# let config = DisplayConfig::load(&path);
# let config = DisplayConfig::load(&path)?;
# mod systems {
#
# use amethyst::core::ecs::{System, SystemData, World};
Expand Down
2 changes: 1 addition & 1 deletion book/src/pong-tutorial/pong-tutorial-04.md
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ as well as adding our new systems to the game data:
# use amethyst::input::StringBindings;
# fn main() -> amethyst::Result<()> {
# let path = "./config/display.ron";
# let config = DisplayConfig::load(&path);
# let config = DisplayConfig::load(&path)?;
# mod systems {
# use amethyst;
# use amethyst::core::ecs::{System, SystemData, World};
Expand Down
2 changes: 1 addition & 1 deletion book/src/pong-tutorial/pong-tutorial-05.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ keep playing after someone scores and log who got the point.
# fn main() -> amethyst::Result<()> {
#
# let path = "./config/display.ron";
# let config = DisplayConfig::load(&path);
# let config = DisplayConfig::load(&path)?;
# let input_bundle = amethyst::input::InputBundle::<StringBindings>::new();
#
# let mut world = World::new();
Expand Down

0 comments on commit 8656079

Please sign in to comment.