diff --git a/CHANGELOG.md b/CHANGELOG.md index ce389f6..c52d231 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +# 0.4.3 + +* Make `Deserializer` type public in order to allow to compose it with wrapper types + # 0.4.2 * Correctly deserialize empty strings into empty sequence [#51](https://github.com/softprops/envy/pull/51) diff --git a/Cargo.toml b/Cargo.toml index ea442ea..f1ae1a1 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "envy" -version = "0.4.2" +version = "0.4.3" authors = ["softprops "] description = "deserialize env vars into typesafe structs" documentation = "https://softprops.github.io/envy" diff --git a/src/lib.rs b/src/lib.rs index 3882ef9..319f4d1 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -76,7 +76,7 @@ pub use crate::error::Error; pub type Result = std::result::Result; #[derive(Default)] -struct VarsOptions { +pub struct VarsOptions { keep_names: bool, } @@ -261,12 +261,12 @@ impl<'de> de::Deserializer<'de> for VarName { } /// A deserializer for env vars -struct Deserializer<'de, Iter: Iterator> { +pub struct Deserializer<'de, Iter: Iterator> { inner: MapDeserializer<'de, Vars, Error>, } impl<'de, Iter: Iterator> Deserializer<'de, Iter> { - fn new( + pub fn new( vars: Iter, options: Option, ) -> Self {