From 49d369f27f4733e42fc9b753573cb55db808a1de Mon Sep 17 00:00:00 2001 From: ynqa Date: Tue, 25 Mar 2025 03:41:59 +0900 Subject: [PATCH] chore: comment about hard to patch (partially) for config using config file --- src/config.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/config.rs b/src/config.rs index d7f6c96..c2c02d5 100644 --- a/src/config.rs +++ b/src/config.rs @@ -212,6 +212,14 @@ impl Default for Keybinds { /// - https://github.com/toml-rs/toml/issues/376 /// - Output inline tables /// - https://github.com/toml-rs/toml/issues/592 +/// +/// Also difficult to patch `Config` using only the items specified in the configuration file +/// (Premise: To address the complexity of configurations, +/// it assumes using a macro to avoid managing Option-wrapped structures on our side).s +/// +/// The main challenge is that, for nested structs, +/// it is not able to wrap every leaf field with Option<>. +/// https://github.com/colin-kiegel/rust-derive-builder/issues/254 #[derive(Serialize, Deserialize)] pub(crate) struct Config { #[serde(with = "duration_serde")]