1
0
mirror of https://github.com/emilk/egui.git synced 2026-08-30 21:30:03 -04:00

Fix compilation with "serialize" feature without "persistence" feature

This commit is contained in:
Emil Ernerfeldt
2021-10-23 15:12:39 +02:00
parent 4ace85b780
commit da09a5c69c
2 changed files with 3 additions and 1 deletions

View File

@@ -28,6 +28,7 @@ pub struct Memory {
/// This map stores current states for widgets that don't require `Id`.
/// This will be saved between different program runs if you use the `persistence` feature.
#[cfg(not(feature = "persistence"))]
#[cfg_attr(feature = "serde", serde(skip))]
pub data: any::TypeMap,
/// Same as `data`, but this data will not be saved between runs.
@@ -42,6 +43,7 @@ pub struct Memory {
/// This map stores current states for all widgets with custom `Id`s.
/// This will be saved between different program runs if you use the `persistence` feature.
#[cfg(not(feature = "persistence"))]
#[cfg_attr(feature = "serde", serde(skip))]
pub id_data: any::AnyMap<Id, crate::id::BuilIdHasher>,
/// Same as `id_data`, but this data will not be saved between runs.