Skip to content

Commit

Permalink
Fix: If no features are enabled, this should still build
Browse files Browse the repository at this point in the history
Signed-off-by: Matthias Beyer <[email protected]>
  • Loading branch information
matthiasbeyer committed Mar 31, 2022
1 parent d2d3561 commit 040fea6
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 040fea6

Please sign in to comment.