No caller yet.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
"structopt",
"strum",
"thirtyfour_sync",
+ "toml 0.5.8",
"void",
"x11rb",
]
pub fn game_spec_path(&self) -> String {
self.subst("@specs@/demo.game.toml")?
}
+
+ #[throws(AE)]
+ pub fn game_spec_data(&self) -> otter::spec::GameSpec {
+ let path = self.game_spec_path()?;
+ (||{
+ let data = fs::read(&path).context("read")?;
+ let data = toml::de::from_slice(&data).context("parse")?;
+ Ok::<_,AE>(data)
+ })()
+ .context(path)
+ .context("game spec")?
+ }
}
#[throws(AE)]
structopt = "0.3"
strum = { version = "0.20", features = ['derive'] }
thirtyfour_sync = "0.22"
+toml = "0.5"
void = "1"
x11rb = "0.8"