mirror of
https://github.com/bevyengine/bevy
synced 2024-11-10 07:04:33 +00:00
Reflect SmolStr
's De/Serialize
implementation (#14982)
# Objective - Fixes #14969 ## Solution - Added `Deserialize` to the list of reflected traits for `SmolStr` ## Testing - CI passed locally. --------- Co-authored-by: Alice Cecile <alice.i.cecile@gmail.com>
This commit is contained in:
parent
d2624765d0
commit
547b1c7a7a
2 changed files with 10 additions and 3 deletions
|
@ -37,7 +37,7 @@ smallvec = { version = "1.11", optional = true }
|
|||
|
||||
glam = { version = "0.28", features = ["serde"], optional = true }
|
||||
petgraph = { version = "0.6", features = ["serde-1"], optional = true }
|
||||
smol_str = { version = "0.2.0", optional = true }
|
||||
smol_str = { version = "0.2.0", features = ["serde"], optional = true }
|
||||
uuid = { version = "1.0", optional = true, features = ["v4", "serde"] }
|
||||
|
||||
[dev-dependencies]
|
||||
|
|
|
@ -1,8 +1,15 @@
|
|||
use crate::std_traits::ReflectDefault;
|
||||
use crate::{self as bevy_reflect};
|
||||
use crate::{std_traits::ReflectDefault, ReflectDeserialize, ReflectSerialize};
|
||||
use bevy_reflect_derive::impl_reflect_value;
|
||||
|
||||
impl_reflect_value!(::smol_str::SmolStr(Debug, Hash, PartialEq, Default));
|
||||
impl_reflect_value!(::smol_str::SmolStr(
|
||||
Debug,
|
||||
Hash,
|
||||
PartialEq,
|
||||
Default,
|
||||
Serialize,
|
||||
Deserialize,
|
||||
));
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
|
|
Loading…
Reference in a new issue