Skip to content

Commit

Permalink
Fix "WASD" example in README (ron-rs#466)
Browse files Browse the repository at this point in the history
* trim trailing whitespace in README 

* fix 'wasd' key map in README example, very important
  • Loading branch information
tje authored and juntyr committed Aug 15, 2023
1 parent 90d98d5 commit 4076f29
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,23 +18,23 @@ GameConfig( // optional struct name
window_size: (800, 600),
window_title: "PAC-MAN",
fullscreen: false,

mouse_sensitivity: 1.4,
key_bindings: {
"up": Up,
"down": Down,
"left": Left,
"right": Right,

// Uncomment to enable WASD controls
/*
"W": Up,
"A": Down,
"S": Left,
"S": Down,
"A": Left,
"D": Right,
*/
},

difficulty_options: (
start_difficulty: Easy,
adaptive: false,
Expand Down Expand Up @@ -146,7 +146,7 @@ struct MyStruct {

fn main() {
let x: MyStruct = ron::from_str("(boolean: true, float: 1.23)").unwrap();

println!("RON: {}", ron::to_string(&x).unwrap());

println!("Pretty RON: {}", ron::ser::to_string_pretty(
Expand Down

0 comments on commit 4076f29

Please sign in to comment.