Skip to content
Merged
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
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions confik/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 `<Self as Default>::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.
Expand Down
2 changes: 1 addition & 1 deletion confik/Cargo.toml
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 2 additions & 2 deletions confik/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
<!-- prettier-ignore-start -->

[![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)
<br />
[![CI](https://github.com/x52dev/confik/actions/workflows/ci.yml/badge.svg)](https://github.com/x52dev/confik/actions/workflows/ci.yml)
Expand Down
Loading