bevy/crates/bevy_ecs/hecs/src/serde.rs
Carter Anderson c81ab99dac cargo fmt
2020-07-10 01:37:06 -07:00

13 lines
288 B
Rust

// modified by Bevy contributors
use crate::entities::Entity;
use serde::{Serialize, Serializer};
impl Serialize for Entity {
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where
S: Serializer,
{
serializer.serialize_u32(self.id())
}
}