Skip to content

Commit

Permalink
cargo fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
dcampbell24 committed Oct 21, 2024
1 parent 40772e6 commit 3ede912
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 11 deletions.
Empty file modified .githooks/pre-commit
100644 → 100755
Empty file.
3 changes: 1 addition & 2 deletions examples/gtp_server_tcp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,13 @@ use clap::{self, Parser};
struct Args {
/// Listen for GTP drivers on host and port
#[arg(default_value = "127.0.0.1:8000", index = 1, value_name = "host:port")]
host_port: String,
host_port: String,

/// Send 'boardsize BOARD_SIZE' to clients
#[arg(long)]
board_size: Option<u8>,
}


fn main() {
let args = Args::parse();

Expand Down
12 changes: 3 additions & 9 deletions src/gtp/engine.rs
Original file line number Diff line number Diff line change
Expand Up @@ -154,16 +154,12 @@ impl Engine {
inner: HashMap::new(),
};

commands.insert("boardsize", |args, game| {
gtp_boardsize(args, game)
});
commands.insert("boardsize", |args, game| gtp_boardsize(args, game));
commands.insert("clear_board", |_args, game| {
game.clear_board();
Ok(None)
});
commands.insert("genmove", |args, game| {
gtp_genmove(args, game)
});
commands.insert("genmove", |args, game| gtp_genmove(args, game));
commands.insert("known_command", |_args, _game| {
unreachable!();
});
Expand Down Expand Up @@ -237,9 +233,7 @@ impl Engine {
game.kgs_game_over = true;
Ok(None)
});
self.insert("kgs-genmove_cleanup", |args, game| {
gtp_genmove(args, game)
});
self.insert("kgs-genmove_cleanup", |args, game| gtp_genmove(args, game));
// kgs-rules
// kgs-time_settings
}
Expand Down

0 comments on commit 3ede912

Please sign in to comment.