chiark
/
gitweb
/
~ianmdlvl
/
otter.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bafd2ca
)
specs: Make `pieces` default
author
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Wed, 31 Mar 2021 18:23:53 +0000
(19:23 +0100)
committer
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Thu, 1 Apr 2021 10:31:37 +0000
(11:31 +0100)
So you can have an empty table, if you want.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
src/spec.rs
patch
|
blob
|
history
diff --git
a/src/spec.rs
b/src/spec.rs
index 921a1721ab8897fb44ef0a5a04f844dbfab3fb37..14fc298d4c3e35f3a31127d71aa56980631d27d9 100644
(file)
--- a/
src/spec.rs
+++ b/
src/spec.rs
@@
-165,7
+165,7
@@
pub struct UrlOnStdout;
#[derive(Debug,Serialize,Deserialize)]
pub struct GameSpec {
#[serde(default="imp::def_table_size")] pub table_size: Pos,
- pub pieces: Vec<PiecesSpec>,
+
#[serde(default)]
pub pieces: Vec<PiecesSpec>,
#[serde(default="imp::def_table_colour")] pub table_colour: ColourSpec,
#[serde(default)] pub pcaliases: HashMap<String, Box<dyn PieceSpec>>,
}