Use ToString

This commit is contained in:
hodasemi 2024-08-27 08:32:54 +02:00
parent 8f01064b88
commit 8ee56b0e90

View file

@ -240,9 +240,9 @@ impl Scene {
}
impl Scene {
pub fn add_archetype(&mut self, id: String, mut archetype: Archetype) -> Result<()> {
pub fn add_archetype(&mut self, id: impl ToString, mut archetype: Archetype) -> Result<()> {
archetype.setup(&self.entities)?;
self.archetypes.insert(id, archetype);
self.archetypes.insert(id.to_string(), archetype);
Ok(())
}