From da09a5c69cd4134d8f4f13cc784b4d46ff3f7210 Mon Sep 17 00:00:00 2001 From: Emil Ernerfeldt Date: Sat, 23 Oct 2021 15:12:39 +0200 Subject: [PATCH] Fix compilation with "serialize" feature without "persistence" feature --- egui/src/memory.rs | 2 ++ sh/check.sh | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/egui/src/memory.rs b/egui/src/memory.rs index 9251d634..76c7385f 100644 --- a/egui/src/memory.rs +++ b/egui/src/memory.rs @@ -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, /// Same as `id_data`, but this data will not be saved between runs. diff --git a/sh/check.sh b/sh/check.sh index 76140f0e..f106330a 100755 --- a/sh/check.sh +++ b/sh/check.sh @@ -23,7 +23,7 @@ cargo doc -p egui_web --target wasm32-unknown-unknown --lib --no-deps --all-feat (cd epaint && cargo check --no-default-features --features "multi_threaded") (cd epaint && cargo check --no-default-features --features "single_threaded" --release) (cd epaint && cargo check --no-default-features --features "multi_threaded" --release) -(cd egui && cargo check --no-default-features --features "multi_threaded") +(cd egui && cargo check --no-default-features --features "multi_threaded,serialize") (cd eframe && cargo check --no-default-features --features "egui_glow") (cd epi && cargo check --no-default-features) (cd egui_web && cargo check --no-default-features)