From 4ba19561a4fd8ea60a7ce3b349ad5d60abfc8082 Mon Sep 17 00:00:00 2001 From: gabriel Date: Wed, 7 Oct 2026 13:27:22 +0200 Subject: [PATCH] docs(core)!: note that DitherConfig gained the dbs field Recommend struct-update syntax (..Default::default()) for DitherConfig, which is resilient to new fields. BREAKING CHANGE: `DitherConfig` has a new public field `dbs` (DBS refinement, added in #71). Code that constructs `DitherConfig` with an exhaustive struct literal must add `dbs: None`, or switch to `..Default::default()`. --- packages/rust/core/src/lib.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/rust/core/src/lib.rs b/packages/rust/core/src/lib.rs index 330763a..bd381fe 100644 --- a/packages/rust/core/src/lib.rs +++ b/packages/rust/core/src/lib.rs @@ -25,6 +25,9 @@ use crate::types::ImageBuffer; /// dither(&img, palette, DitherConfig { mode: DitherMode::Burkes, ..Default::default() }); /// ``` /// +/// Prefer `..Default::default()` over listing every field: new fields (e.g. `dbs` in 6.0.0) +/// are breaking for exhaustive struct literals, but not for struct-update syntax. +/// /// Pre-processing pipeline (applied in order, each step is a no-op at its identity value): /// `exposure → saturation → shadows/highlights → tone → gamut → dither → dbs`. #[derive(Debug, Clone, PartialEq)]