Build-fix for --no-default-features
This commit is contained in:
parent
f4cc1c5465
commit
eb10ef94f7
2 changed files with 11 additions and 4 deletions
|
@ -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",
|
||||
|
|
|
@ -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…
Reference in a new issue