aboutsummaryrefslogtreecommitdiff
path: root/server/data
diff options
context:
space:
mode:
authornokoe <nokoe@mailbox.org>2025-12-14 01:43:22 +0100
committernokoe <nokoe@mailbox.org>2025-12-14 01:44:14 +0100
commitf43daec5936b827285a14c50377bb592ed9d1311 (patch)
tree28573f5b4339c3f23f455b0debef178c9ea45b55 /server/data
parentb87392558f12de8404bd5ab181d328fd66a106e2 (diff)
downloadhurrycurry-f43daec5936b827285a14c50377bb592ed9d1311.tar
hurrycurry-f43daec5936b827285a14c50377bb592ed9d1311.tar.bz2
hurrycurry-f43daec5936b827285a14c50377bb592ed9d1311.tar.zst
replace `serde_yml` with `serde_yaml_ng`
Diffstat (limited to 'server/data')
-rw-r--r--server/data/Cargo.toml2
-rw-r--r--server/data/src/index.rs6
2 files changed, 4 insertions, 4 deletions
diff --git a/server/data/Cargo.toml b/server/data/Cargo.toml
index 65064735..9233de18 100644
--- a/server/data/Cargo.toml
+++ b/server/data/Cargo.toml
@@ -11,7 +11,7 @@ serde_json = "1.0.145"
serde = { version = "1.0.225", features = ["derive"] }
shlex = "1.3.0"
clap = { version = "4.5.47", features = ["derive"] }
-serde_yml = "0.0.12"
+serde_yaml_ng = "0.10.0"
log = "0.4.28"
[features]
diff --git a/server/data/src/index.rs b/server/data/src/index.rs
index a74b283c..7eed1699 100644
--- a/server/data/src/index.rs
+++ b/server/data/src/index.rs
@@ -48,7 +48,7 @@ impl DataIndex {
}
pub fn reload(&mut self) -> Result<()> {
let path = self.path.clone();
- *self = serde_yml::from_reader(
+ *self = serde_yaml_ng::from_reader(
File::open(self.path.join("index.yaml")).context("Failed opening data index")?,
)?;
self.path = path;
@@ -72,13 +72,13 @@ impl DataIndex {
}
pub fn generate(&self, map: &str) -> Result<(Gamedata, Serverdata)> {
debug!("Loading map {map}...");
- let map_in: MapDecl = serde_yml::from_str(
+ let map_in: MapDecl = serde_yaml_ng::from_str(
&self
.read_map(map)
.context(anyhow!("Failed to read map file ({map})"))?,
)
.context(anyhow!("Failed to parse map file ({map})"))?;
- let recipes_in = serde_yml::from_str(
+ let recipes_in = serde_yaml_ng::from_str(
&self
.read_recipes(map_in.recipes.as_deref().unwrap_or("default"))
.context("Failed read recipe file")?,