Skip to content

Commit

Permalink
Merge pull request #309 from matthiasbeyer/fix-no-feature-build
Browse files Browse the repository at this point in the history
Fix: If no features are enabled, this should still build
  • Loading branch information
matthiasbeyer authored Mar 31, 2022
2 parents 7cf33db + 040fea6 commit 90bcc5d
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/file/format/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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"),
}
}
}
Expand Down

0 comments on commit 90bcc5d

Please sign in to comment.