Fix main readme example with updated syntax.
@@ -27,7 +27,7 @@ For the simplest possible *Hello World*, your source code (`main.rs`) can look l
```rust
extern crate rltk;
-use rltk::{Rltk, GameState, Console, RGB};
+use rltk::{Rltk, GameState, Console};
struct State {}
impl GameState for State {
@@ -38,9 +38,9 @@ impl GameState for State {
}
fn main() {
- let mut context = Rltk::init_simple8x8(80, 50, "Hello RLTK World", "resources");
- let mut gs = State{ };
- context.main_loop(&mut gs);
+ let context = Rltk::init_simple8x8(80, 50, "Hello RLTK World", "resources");
+ let gs = State{ };
+ rltk::main_loop(context, Box::new(gs));
}
```
