Skip to content

Commit

Permalink
Use default serde impls for Entity
Browse files Browse the repository at this point in the history
  • Loading branch information
Shatur committed Oct 7, 2022
1 parent 6b75589 commit 3c6d9de
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 48 deletions.
2 changes: 1 addition & 1 deletion crates/bevy_ecs/Cargo.toml
Expand Up @@ -26,7 +26,7 @@ thread_local = "1.1.4"
fixedbitset = "0.4"
fxhash = "0.2"
downcast-rs = "1.2"
serde = "1"
serde = { version = "1", features = ["derive"] }

[dev-dependencies]
rand = "0.8"
Expand Down
5 changes: 2 additions & 3 deletions crates/bevy_ecs/src/entity/mod.rs
Expand Up @@ -31,12 +31,11 @@
//! [`EntityMut::insert`]: crate::world::EntityMut::insert
//! [`EntityMut::remove`]: crate::world::EntityMut::remove
mod map_entities;
mod serde;

pub use self::serde::*;
pub use map_entities::*;

use crate::{archetype::ArchetypeId, storage::SparseSetIndex};
use serde::{Deserialize, Serialize};
use std::{convert::TryFrom, fmt, mem, sync::atomic::Ordering};

#[cfg(target_has_atomic = "64")]
Expand Down Expand Up @@ -104,7 +103,7 @@ type IdCursor = isize;
/// [`EntityMut::id`]: crate::world::EntityMut::id
/// [`EntityCommands`]: crate::system::EntityCommands
/// [`Query::get`]: crate::system::Query::get
#[derive(Clone, Copy, Hash, Eq, Ord, PartialEq, PartialOrd)]
#[derive(Clone, Copy, Deserialize, Eq, Hash, Ord, PartialEq, PartialOrd, Serialize)]
pub struct Entity {
pub(crate) generation: u32,
pub(crate) id: u32,
Expand Down
44 changes: 0 additions & 44 deletions crates/bevy_ecs/src/entity/serde.rs

This file was deleted.

0 comments on commit 3c6d9de

Please sign in to comment.