Powered by OpenAIRE graph
Found an issue? Give us feedback
addClaim

oxur/twyg: 0.6.3 - Support Partial Configs

Authors: Duncan McGreggor;

oxur/twyg: 0.6.3 - Support Partial Configs

Abstract

Overview Version 0.6.3 is a bug fix release addressing an issue where twyg::Opts required all fields to be present during deserialization, making it impractical to use in partial TOML/YAML/JSON configurations. Users can now specify only the fields they want to override and rely on defaults for the rest. This release also relaxes version specifiers for some dependencies. Bug Fixes Partial Deserialization of Opts (Closes #7) Issue: When embedding twyg::Opts directly in an application config struct, users were forced to specify every field in their configuration file. A minimal config like: [logging] level = "debug" Would fail with: TOML parse error at line 3, column 1 | 3 | [logging] | ^^^^^^^^^ missing field `coloured` Root Cause: Four fields on the Opts struct (coloured, output, level, report_caller) were missing #[serde(default)] attributes, while the remaining seven fields already had them. Solution: Added #[serde(default)] to the four missing fields. All four types already implement Default with values matching Opts::default(): coloured: bool -- defaults to false output: Output -- defaults to Output::Stdout level: LogLevel -- defaults to LogLevel::Error report_caller: bool -- defaults to false Impact: Users can now embed twyg::Opts in their config structs and provide minimal configurations, specifying only the fields they want to override. Files Changed: src/opts.rs -- Added #[serde(default)] to 4 fields, added unit test tests/integration_tests.rs -- Added integration test for partial TOML deserialization Dependencies Version Specifier Cleanup Relaxed version specifiers for two dependencies to follow standard semver conventions: thiserror: "2.0" -> "2" (resolved: 2.0.18) anyhow (dev): "1.0.100" -> "1" (resolved: 1.0.101) Lockfile Updates Updated transitive dependencies via Cargo.lock: chrono: 0.4.42 -> 0.4.43 thiserror: 2.0.17 -> 2.0.18 anyhow: 1.0.100 -> 1.0.101 Various other transitive dependency updates (wasm-bindgen, windows-core, etc.) Backward Compatibility This release maintains full backward compatibility with 0.6.2: No API changes No breaking changes Existing configurations continue to work Fixes only enhance existing functionality Installation [dependencies] twyg = "0.6.3" Or update existing installations: cargo update twyg Full Changelog: https://github.com/oxur/twyg/compare/0.6.2...0.6.3

  • BIP!
    Impact byBIP!
    selected citations
    These citations are derived from selected sources.
    This is an alternative to the "Influence" indicator, which also reflects the overall/total impact of an article in the research community at large, based on the underlying citation network (diachronically).
    0
    popularity
    This indicator reflects the "current" impact/attention (the "hype") of an article in the research community at large, based on the underlying citation network.
    Average
    influence
    This indicator reflects the overall/total impact of an article in the research community at large, based on the underlying citation network (diachronically).
    Average
    impulse
    This indicator reflects the initial momentum of an article directly after its publication, based on the underlying citation network.
    Average
Powered by OpenAIRE graph
Found an issue? Give us feedback
selected citations
These citations are derived from selected sources.
This is an alternative to the "Influence" indicator, which also reflects the overall/total impact of an article in the research community at large, based on the underlying citation network (diachronically).
BIP!Citations provided by BIP!
popularity
This indicator reflects the "current" impact/attention (the "hype") of an article in the research community at large, based on the underlying citation network.
BIP!Popularity provided by BIP!
influence
This indicator reflects the overall/total impact of an article in the research community at large, based on the underlying citation network (diachronically).
BIP!Influence provided by BIP!
impulse
This indicator reflects the initial momentum of an article directly after its publication, based on the underlying citation network.
BIP!Impulse provided by BIP!
0
Average
Average
Average