diff --git a/Cargo.lock b/Cargo.lock index 5cbbac5..c9ff11b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -222,7 +222,7 @@ dependencies = [ [[package]] name = "confik" -version = "0.15.9" +version = "0.15.10" dependencies = [ "ahash 0.8.12", "anyhow", diff --git a/confik/CHANGELOG.md b/confik/CHANGELOG.md index c5529f5..be51bb0 100644 --- a/confik/CHANGELOG.md +++ b/confik/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 0.15.10 + - Add `#[confik(struct_default)]` for struct fields: when no configuration data is present for that field, its value is taken from the same-named field on `::default()`. Can be combined with `#[confik(skip)]` (in place of an explicit `#[confik(default)]`). Cannot be combined with `#[confik(default)]` on the same field, and is not supported on enum variant fields (the configuration type must remain a struct). - Fix `#[confik(default = ...)]` with `from` / `try_from`: when no data is merged, the default expression is evaluated as the **target** field type (after the macro’s `Into::into`), matching the `struct_default` missing-data path, instead of being forced to unify with the intermediate builder type. - Note although this was likely what your code was assuming (and was only working due to the implied `Into`), this may break existing code. diff --git a/confik/Cargo.toml b/confik/Cargo.toml index ff5597c..1dac4c6 100644 --- a/confik/Cargo.toml +++ b/confik/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "confik" -version = "0.15.9" +version = "0.15.10" description = "Compose configuration from multiple sources without giving up type safety" authors.workspace = true keywords.workspace = true diff --git a/confik/README.md b/confik/README.md index 8da7e6d..fc1ccbb 100644 --- a/confik/README.md +++ b/confik/README.md @@ -3,8 +3,8 @@ [![crates.io](https://img.shields.io/crates/v/confik?label=latest)](https://crates.io/crates/confik) -[![Documentation](https://docs.rs/confik/badge.svg?version=0.15.9)](https://docs.rs/confik/0.15.9) -[![dependency status](https://deps.rs/crate/confik/0.15.9/status.svg)](https://deps.rs/crate/confik/0.15.9) +[![Documentation](https://docs.rs/confik/badge.svg?version=0.15.10)](https://docs.rs/confik/0.15.10) +[![dependency status](https://deps.rs/crate/confik/0.15.10/status.svg)](https://deps.rs/crate/confik/0.15.10) ![MIT or Apache 2.0 licensed](https://img.shields.io/crates/l/confik.svg)
[![CI](https://github.com/x52dev/confik/actions/workflows/ci.yml/badge.svg)](https://github.com/x52dev/confik/actions/workflows/ci.yml)