<feed xmlns='http://www.w3.org/2005/Atom'>
<title>mirrors/arti.git/crates/slotmap-careful/src/key_data.rs, branch arti-v2.1.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.1.0</id>
<link rel='self' href='http://git.dilluti0n.com/mirrors/arti.git/atom?h=arti-v2.1.0'/>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/'/>
<updated>2025-08-07T15:28:36Z</updated>
<entry>
<title>Switch Cargo.toml files to edition 2024.</title>
<updated>2025-08-07T15:28:36Z</updated>
<author>
<name>Nick Mathewson</name>
<email>nickm@torproject.org</email>
</author>
<published>2025-08-06T01:19:58Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=77b0de43b8c67cdb81befe0680a3df43b6ad37bc'/>
<id>urn:sha1:77b0de43b8c67cdb81befe0680a3df43b6ad37bc</id>
<content type='text'>
First, run

```
git grep -l "^edition =" |
    xargs perl -i -pe 's/^edition *=.*/edition = "2024"/;'
```

Second, manually verify that all Cargo.toml files have changed,
and nothing else has changed.

Third, run cargo fmt again.
</content>
</entry>
<entry>
<title>New `slotmap-careful` crate to use when we mustn't re-use keys.</title>
<updated>2024-08-08T14:15:49Z</updated>
<author>
<name>Nick Mathewson</name>
<email>nickm@torproject.org</email>
</author>
<published>2024-07-31T17:22:44Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=56f9cb5ddb70f5a49ae9b90945693cc7e7269e7c'/>
<id>urn:sha1:56f9cb5ddb70f5a49ae9b90945693cc7e7269e7c</id>
<content type='text'>
This crate works as a drop-in replacement for
the generational arena types
`slotmap::{SlotMap, DenseSlotMap, HopSlotMap}`,
and is implemented a set of wrappers around those types.

The wrappers guarantee that slot versions numbers can never wrap
around by marking as unusable any slot whose version number
would otherwise get too high.  (We add some leeway between our max
allowed version number and the largest possible version number,
so that we can detect bugs.)

The code relies on the serde encoding of slotmap key versions.
For notes on stability and (surprisingly good) performance,
see the comments.

Test coverage is around 98% for the lib.rs file; it's lower in
key_data.rs, since the error cases are unreachable given
slotmap's current behavior.

Open questions:

  * What further testing is a good idea?

  * Will slotmap ever upstream something like this?

See "# Limitations" comment for the parts of slotmap that are not
implemented; I hope that we don't need them.
</content>
</entry>
</feed>
