From 448f245f64c8a739ce6a885126f4466a667d6d8c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lvaro=20Mond=C3=A9jar=20Rubio?= Date: Sat, 22 Jun 2024 00:37:53 +0200 Subject: [PATCH 1/2] Fix `serde` dependency usage --- leptos-fluent-macros/src/languages.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/leptos-fluent-macros/src/languages.rs b/leptos-fluent-macros/src/languages.rs index 1de4f946..80867ab5 100644 --- a/leptos-fluent-macros/src/languages.rs +++ b/leptos-fluent-macros/src/languages.rs @@ -1,6 +1,7 @@ use std::fs; use std::path::PathBuf; +#[cfg(any(feature = "json", feature = "yaml", feature = "json5"))] #[derive(serde::Deserialize)] #[serde(untagged)] enum LanguagesFileLanguage { @@ -8,6 +9,7 @@ enum LanguagesFileLanguage { CodeNameDir(String, String, String), } +#[cfg(any(feature = "json", feature = "yaml", feature = "json5"))] fn set_dir_to_languages_from_languages_file( languages: &[LanguagesFileLanguage], ) -> Vec<(String, String, String)> { From 4ee94461b97da57a085e196a246c96317cb5f64f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lvaro=20Mond=C3=A9jar=20Rubio?= Date: Sat, 22 Jun 2024 00:39:43 +0200 Subject: [PATCH 2/2] No default features in minimal example --- examples/csr-minimal/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/csr-minimal/Cargo.toml b/examples/csr-minimal/Cargo.toml index 28ce2ea4..2f243dd9 100644 --- a/examples/csr-minimal/Cargo.toml +++ b/examples/csr-minimal/Cargo.toml @@ -9,7 +9,7 @@ path = "src/lib.rs" [dependencies] leptos = { version = "0.6.12", features = ["csr"] } -leptos-fluent = { path = "../../leptos-fluent" } +leptos-fluent = { path = "../../leptos-fluent", default-features = false } fluent-templates = "0.9" console_error_panic_hook = "0.1"