Browse Source

Build-fix for `--no-default-features`

pull/1943/head
Emil Ernerfeldt 2 years ago
parent
commit
eb10ef94f7
  1. 13
      crates/egui_demo_app/src/wrap_app.rs
  2. 2
      crates/epaint/Cargo.toml

13
crates/egui_demo_app/src/wrap_app.rs

@ -93,21 +93,27 @@ pub struct State {
/// Wraps many demo/test apps into one.
pub struct WrapApp {
state: State,
#[cfg(any(feature = "glow", feature = "wgpu"))]
custom3d: crate::apps::Custom3d,
dropped_files: Vec<egui::DroppedFile>,
}
impl WrapApp {
pub fn new(cc: &eframe::CreationContext<'_>) -> Self {
pub fn new(_cc: &eframe::CreationContext<'_>) -> Self {
#[allow(unused_mut)]
let mut slf = Self {
state: State::default(),
custom3d: crate::apps::Custom3d::new(cc),
#[cfg(any(feature = "glow", feature = "wgpu"))]
custom3d: crate::apps::Custom3d::new(_cc),
dropped_files: Default::default(),
};
#[cfg(feature = "persistence")]
if let Some(storage) = cc.storage {
if let Some(storage) = _cc.storage {
if let Some(state) = eframe::get_value(storage, eframe::APP_KEY) {
slf.state = state;
}
@ -141,6 +147,7 @@ impl WrapApp {
),
];
#[cfg(any(feature = "glow", feature = "wgpu"))]
vec.push((
"🔺 3D painting",
"custom3d",

2
crates/epaint/Cargo.toml

@ -56,7 +56,7 @@ serde = ["dep:serde", "ahash/serde", "emath/serde"]
emath = { version = "0.18.0", path = "../emath" }
ab_glyph = "0.2.11"
ahash = { version = "0.8", default-features = false, features = ["std"] }
ahash = "0.8"
nohash-hasher = "0.2"
#! ### Optional dependencies

Loading…
Cancel
Save