<feed xmlns='http://www.w3.org/2005/Atom'>
<title>mirrors/arti.git/crates/tor-config/src/derive.rs, branch arti-v2.4.0</title>
<subtitle>mirror of https://gitlab.torproject.org/tpo/core/arti
</subtitle>
<id>http://git.dilluti0n.com/mirrors/arti.git/atom?h=arti-v2.4.0</id>
<link rel='self' href='http://git.dilluti0n.com/mirrors/arti.git/atom?h=arti-v2.4.0'/>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/'/>
<updated>2026-05-27T12:05:52Z</updated>
<entry>
<title>Apply 3 suggestion(s) to 2 file(s)</title>
<updated>2026-05-27T12:05:52Z</updated>
<author>
<name>Nick Mathewson</name>
<email>nickm@torproject.org</email>
</author>
<published>2026-05-21T14:20:20Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=69db75387c44326411c729eaab5126de4d6e7b07'/>
<id>urn:sha1:69db75387c44326411c729eaab5126de4d6e7b07</id>
<content type='text'>
Co-authored-by: gabi-250 &lt;gabi@torproject.org&gt;</content>
</entry>
<entry>
<title>config: Add a dd(TorConfig) attribute to override apply_defaults().</title>
<updated>2026-05-27T12:05:52Z</updated>
<author>
<name>Nick Mathewson</name>
<email>nickm@torproject.org</email>
</author>
<published>2026-05-18T15:44:47Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=021ee4be56bba1f927edc20cfb1c3404e610ba2b'/>
<id>urn:sha1:021ee4be56bba1f927edc20cfb1c3404e610ba2b</id>
<content type='text'>
</content>
</entry>
<entry>
<title>config: Add a method to fill in a builder with unset defaults</title>
<updated>2026-05-27T12:05:52Z</updated>
<author>
<name>Nick Mathewson</name>
<email>nickm@torproject.org</email>
</author>
<published>2026-05-18T14:13:34Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=f1df3d1c8d83fd63d484cccf0bf45534f0369761'/>
<id>urn:sha1:f1df3d1c8d83fd63d484cccf0bf45534f0369761</id>
<content type='text'>
This new method modifies a builder by replacing any unset values
that have a default with that default.  We're using this method
so that we can re-serialize a builder into a `ConfigurationTree`
with all of its default values included.

In all cases, `b.apply_defaults()?; b.build()` should produce
the same output as `b.build()`.

The interesting parts of this commit are in tor_config::load
and tor_config::derive.  The rest of this commit just adds
`apply_defaults` to other builders that _aren't_ made with
`derive_deftly(TorConfig)`.
</content>
</entry>
<entry>
<title>dd(TorConfig): change the order of default vs magic</title>
<updated>2026-05-27T12:05:51Z</updated>
<author>
<name>Nick Mathewson</name>
<email>nickm@torproject.org</email>
</author>
<published>2026-05-17T23:49:05Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=0fdf73cc2f88256fb6613d9ecc005a4d1f1217f5'/>
<id>urn:sha1:0fdf73cc2f88256fb6613d9ecc005a4d1f1217f5</id>
<content type='text'>
This affects the automatic builder code made by our
derive_deftly macro.  It is only relevant (for now)
in the case of the `NonZero&lt;&gt;` types and their special handling.

Previously, when a builder contained Option&lt;U&gt;,
and we wanted to generate a configuration holding T,
we would _first_ apply a transformation from Option&lt;U&gt; to Option&lt;T&gt;
and _second_ unwrap the result or apply a default.

Now, we _first_ convert from Option&lt;U&gt; to U by applying a default,
and only _then_ perform any necessary conversion from U and T.

This is only relevant in the case where U and T are different.
It simplifies writing the defaults for `NonZero` options,
and will significantly simplify the logic for setting builder defaults.
</content>
</entry>
<entry>
<title>tor-config::derive: use cfg(true) and cfg(false)</title>
<updated>2026-05-07T12:08:01Z</updated>
<author>
<name>Nick Mathewson</name>
<email>nickm@torproject.org</email>
</author>
<published>2026-05-04T13:38:44Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=2d4d23666853abbfaeb60cd7466df7117dc3219f'/>
<id>urn:sha1:2d4d23666853abbfaeb60cd7466df7117dc3219f</id>
<content type='text'>
Rust 1.88 added these, so we no longer have to use `any()` for false
and `all()` for true.
</content>
</entry>
<entry>
<title>Fix word duplicate typos</title>
<updated>2026-03-15T20:18:56Z</updated>
<author>
<name>Tobias Stoeckmann</name>
<email>tobias@stoeckmann.org</email>
</author>
<published>2026-03-15T20:05:34Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=2173207d8b909d1afdc55adda13faac13cdded0f'/>
<id>urn:sha1:2173207d8b909d1afdc55adda13faac13cdded0f</id>
<content type='text'>
</content>
</entry>
<entry>
<title>tor-config: future-proof #[cfg] attribute.</title>
<updated>2026-02-24T13:05:39Z</updated>
<author>
<name>Nick Mathewson</name>
<email>nickm@torproject.org</email>
</author>
<published>2026-02-23T13:47:55Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=19222139860a08210dde4c2544c7c1a0c359f7d8'/>
<id>urn:sha1:19222139860a08210dde4c2544c7c1a0c359f7d8</id>
<content type='text'>
</content>
</entry>
<entry>
<title>tor-config: Add an option to reject configured-out options</title>
<updated>2026-02-24T13:05:39Z</updated>
<author>
<name>Nick Mathewson</name>
<email>nickm@torproject.org</email>
</author>
<published>2026-02-19T15:24:09Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=1edcedfa7902edafa3580083265507653fcc2d11'/>
<id>urn:sha1:1edcedfa7902edafa3580083265507653fcc2d11</id>
<content type='text'>
</content>
</entry>
<entry>
<title>tor-config: Have macros document more types and fns</title>
<updated>2026-02-24T13:05:39Z</updated>
<author>
<name>Nick Mathewson</name>
<email>nickm@torproject.org</email>
</author>
<published>2026-02-18T15:21:40Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=7cb398e48fabcb296282f3b21150c6bccdc0d399'/>
<id>urn:sha1:7cb398e48fabcb296282f3b21150c6bccdc0d399</id>
<content type='text'>
</content>
</entry>
<entry>
<title>tor-config: Fix cfg() on sub_builders</title>
<updated>2026-02-24T13:05:39Z</updated>
<author>
<name>Nick Mathewson</name>
<email>nickm@torproject.org</email>
</author>
<published>2026-02-18T14:30:22Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=0a5c3cfa5744fccd0a3b806b5aa60c28f507d0a7'/>
<id>urn:sha1:0a5c3cfa5744fccd0a3b806b5aa60c28f507d0a7</id>
<content type='text'>
Previously, it used the sub_builder rule, which doesn't make sense
when the value is a stub place-holder to tell us whether to warn.
</content>
</entry>
</feed>
