<feed xmlns='http://www.w3.org/2005/Atom'>
<title>mirrors/arti.git/crates/tor-config/src/derive.rs, branch main</title>
<subtitle>mirror of https://gitlab.torproject.org/tpo/core/arti
</subtitle>
<id>http://git.dilluti0n.com/mirrors/arti.git/atom?h=main</id>
<link rel='self' href='http://git.dilluti0n.com/mirrors/arti.git/atom?h=main'/>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/'/>
<updated>2026-06-11T10:37:21Z</updated>
<entry>
<title>tor-config: derive.rs: use beta_deftly $impl feature</title>
<updated>2026-06-11T10:37:21Z</updated>
<author>
<name>Ian Jackson</name>
<email>ijackson@chiark.greenend.org.uk</email>
</author>
<published>2026-06-11T10:29:59Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=cd0070123f8f0f2c491ace663d67e662f4705069'/>
<id>urn:sha1:cd0070123f8f0f2c491ace663d67e662f4705069</id>
<content type='text'>
</content>
</entry>
<entry>
<title>assert_not_impl: Promote to tor-basic-utils</title>
<updated>2026-06-10T14:42:10Z</updated>
<author>
<name>Ian Jackson</name>
<email>ijackson@chiark.greenend.org.uk</email>
</author>
<published>2026-06-10T11:05:01Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=8783e31c6c0a0f17f558f809160b4e6869cab0b0'/>
<id>urn:sha1:8783e31c6c0a0f17f558f809160b4e6869cab0b0</id>
<content type='text'>
I want this in tor-netdoc (which doesn't use tor-config and probably
shouldn't).

Almost entirely code motion.  Review with --color-moved.
</content>
</entry>
<entry>
<title>assert_not_impl: Change example to use Cell</title>
<updated>2026-06-10T14:42:10Z</updated>
<author>
<name>Ian Jackson</name>
<email>ijackson@chiark.greenend.org.uk</email>
</author>
<published>2026-06-10T10:59:53Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=3223eb553074620691f70b1ffad2f7ef7f7d26af'/>
<id>urn:sha1:3223eb553074620691f70b1ffad2f7ef7f7d26af</id>
<content type='text'>
I want to mvoe this to tor-basic-utils, so it can't use tor-config in
its example.  Also, Cell is just a nicer example.

(The rule identifier was already wrong.)
</content>
</entry>
<entry>
<title>assert_not_impl: Introduce some `use`s</title>
<updated>2026-06-10T14:42:10Z</updated>
<author>
<name>Ian Jackson</name>
<email>ijackson@chiark.greenend.org.uk</email>
</author>
<published>2026-06-10T10:59:00Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=b2863dd1d68a9e1ab4db3e9294d1327ed6a2dfb5'/>
<id>urn:sha1:b2863dd1d68a9e1ab4db3e9294d1327ed6a2dfb5</id>
<content type='text'>
IMO this makes the example clearer.  It will also make moving this
macro to tor-basic-utils less noisy.
</content>
</entry>
<entry>
<title>maint: Run maint/add_warning to deny string slices</title>
<updated>2026-06-09T15:36:01Z</updated>
<author>
<name>Clara Engler</name>
<email>cve@cve.cx</email>
</author>
<published>2026-06-09T15:36:01Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=9f5752a77fb57052c06ead0eeae606831f1e8e97'/>
<id>urn:sha1:9f5752a77fb57052c06ead0eeae606831f1e8e97</id>
<content type='text'>
This commit executes maint/add_warning with the just added change to
deny string slices except in tests.

I recommend auditing this by checking out the previous commit followed
by running the script yourself and then verifying that the diff is
identical to this commit.

This commit makes cargo clippy fail.  We will add exceptions in the next
commit.
</content>
</entry>
<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>
</feed>
