diff options
author | Matthias Beyer <mail@beyermatthias.de> | 2022-03-31 10:27:33 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-31 10:27:33 +0200 |
commit | 90bcc5d7c11fd98af78ac0a6f7db3fdd7f025a87 (patch) | |
tree | 1d1a598f28492c150a89c322b6b56b7046da9fb6 | |
parent | 7cf33db48d8a4b38b1ab6a8dbf1b4162d56b6baf (diff) | |
parent | 040fea69449c38f3f019df13a5fa6008c2aff308 (diff) |
Merge pull request #309 from matthiasbeyer/fix-no-feature-build
Fix: If no features are enabled, this should still build
-rw-r--r-- | src/file/format/mod.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/file/format/mod.rs b/src/file/format/mod.rs index 3c18e3c..025e98a 100644 --- a/src/file/format/mod.rs +++ b/src/file/format/mod.rs @@ -116,6 +116,16 @@ impl FileFormat { #[cfg(feature = "json5")] FileFormat::Json5 => json5::parse(uri, text), + + #[cfg(all( + not(feature = "toml"), + not(feature = "json"), + not(feature = "yaml"), + not(feature = "ini"), + not(feature = "ron"), + not(feature = "json5"), + ))] + _ => unreachable!("No features are enabled, this library won't work without features"), } } } |