Skip to content

Commit c657caa

Browse files
committed
fix native build
1 parent 8baac6f commit c657caa

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/app.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@ use catppuccin_egui::{FRAPPE, LATTE, MACCHIATO, MOCHA};
1414
use crate::utils::load_config;
1515
#[cfg(not(target_arch = "wasm32"))]
1616
use crate::utils::get_yaml_files_in_data_folder;
17+
#[cfg(target_arch = "wasm32")]
1718
use std::collections::HashMap;
19+
#[cfg(target_arch = "wasm32")]
1820
use uuid::Uuid;
1921

2022

@@ -44,7 +46,7 @@ pub struct MyLifeApp {
4446
#[serde(skip)]
4547
original_legend_item: Option<LegendItem>,
4648
}
47-
49+
#[cfg(target_arch = "wasm32")]
4850
impl Default for Config {
4951
fn default() -> Self {
5052
serde_yaml::from_str(DEFAULT_CONFIG_YAML).unwrap_or_else(|_| {
@@ -58,7 +60,7 @@ impl Default for Config {
5860
})
5961
}
6062
}
61-
63+
#[cfg(target_arch = "wasm32")]
6264
impl From<Config> for RuntimeConfig {
6365
fn from(config: Config) -> Self {
6466
RuntimeConfig {
@@ -89,7 +91,6 @@ impl Default for MyLifeApp {
8991

9092
#[cfg(not(target_arch = "wasm32"))]
9193
let config = {
92-
let yaml_files = get_yaml_files_in_data_folder();
9394
let default_yaml = "default.yaml".to_string();
9495
load_config(&default_yaml)
9596
};

0 commit comments

Comments
 (0)