aboutsummaryrefslogtreecommitdiff
path: root/server/src/entity/mod.rs
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2024-07-23 13:36:45 +0200
committermetamuffin <metamuffin@disroot.org>2024-07-23 13:36:45 +0200
commit35a16fd090a49aca15c942b769d8c1f16dd2d33f (patch)
tree8029b2a5c58fb28ab53aab65dc7b62620ff8a9c6 /server/src/entity/mod.rs
parent4899cad95fd2abe99d2057fb9c5425c18d8f2bcb (diff)
downloadhurrycurry-35a16fd090a49aca15c942b769d8c1f16dd2d33f.tar
hurrycurry-35a16fd090a49aca15c942b769d8c1f16dd2d33f.tar.bz2
hurrycurry-35a16fd090a49aca15c942b769d8c1f16dd2d33f.tar.zst
check if demands are emtpy to prevent crash
Diffstat (limited to 'server/src/entity/mod.rs')
-rw-r--r--server/src/entity/mod.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/server/src/entity/mod.rs b/server/src/entity/mod.rs
index ec5ec744..95172ed0 100644
--- a/server/src/entity/mod.rs
+++ b/server/src/entity/mod.rs
@@ -108,7 +108,7 @@ pub fn construct_entity(
.filter(|(_, (tile, _))| *tile == chair)
.map(|(e, _)| (*e, true))
.collect();
- Entity::Customers(Customers::new(chairs, demands))
+ Entity::Customers(Customers::new(chairs, demands)?)
}
})
}