Skip to content

Commit

Permalink
Move all optional features to the features module.
Browse files Browse the repository at this point in the history
  • Loading branch information
de-vri-es committed Sep 13, 2024
1 parent c7f313f commit cdf6832
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 11 deletions.
File renamed without changes.
11 changes: 11 additions & 0 deletions src/features/mod.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#[cfg(feature = "json")]
#[cfg_attr(feature = "doc-cfg", doc(cfg(feature = "json")))]
pub mod json;

#[cfg(feature = "yaml")]
#[cfg_attr(feature = "doc-cfg", doc(cfg(feature = "yaml")))]
pub mod yaml;

#[cfg(feature = "toml")]
#[cfg_attr(feature = "doc-cfg", doc(cfg(feature = "toml")))]
pub mod toml;
File renamed without changes.
File renamed without changes.
14 changes: 3 additions & 11 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,17 +92,9 @@ pub use map::*;
mod template;
pub use template::*;

#[cfg(feature = "json")]
#[cfg_attr(feature = "doc-cfg", doc(cfg(feature = "json")))]
pub mod json;

#[cfg(feature = "yaml")]
#[cfg_attr(feature = "doc-cfg", doc(cfg(feature = "yaml")))]
pub mod yaml;

#[cfg(feature = "toml")]
#[cfg_attr(feature = "doc-cfg", doc(cfg(feature = "toml")))]
pub mod toml;
mod features;
#[allow(unused_imports)] // Might not re-export anything if all features are disabled.
pub use features::*;

/// Substitute variables in a string.
///
Expand Down

0 comments on commit cdf6832

Please sign in to comment.