Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "envy"
version = "0.4.2"
version = "0.4.3"
authors = ["softprops <[email protected]>"]
description = "deserialize env vars into typesafe structs"
documentation = "https://softprops.github.io/envy"
Expand Down
6 changes: 3 additions & 3 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ pub use crate::error::Error;
pub type Result<T> = std::result::Result<T, Error>;

#[derive(Default)]
struct VarsOptions {
pub struct VarsOptions {
keep_names: bool,
}

Expand Down Expand Up @@ -261,12 +261,12 @@ impl<'de> de::Deserializer<'de> for VarName {
}

/// A deserializer for env vars
struct Deserializer<'de, Iter: Iterator<Item = (String, String)>> {
pub struct Deserializer<'de, Iter: Iterator<Item = (String, String)>> {
inner: MapDeserializer<'de, Vars<Iter>, Error>,
}

impl<'de, Iter: Iterator<Item = (String, String)>> Deserializer<'de, Iter> {
fn new(
pub fn new(
vars: Iter,
options: Option<VarsOptions>,
) -> Self {
Expand Down