1
0
Fork 0
mirror of https://github.com/zhaofengli/attic.git synced 2024-12-15 17:50:57 +00:00
attic/token/src
Cole Helbling 18dedcc30b token: switch to using IndexMap for consistent ordering of entries
Because of the random ordering of HashMap, if you have
overlapping token permissions, it is possible to randomly pick
one that leads to some operation working intermittently (see
https://github.com/zhaofengli/attic/issues/133 for an example of this).

By using an IndexMap instead, we make "iteration order of the key-value
pairs [...] independent of the hash values of the keys" (from the
indexmap crate docs [1]), which leads to more predictable behavior.

[1]: https://docs.rs/indexmap/latest/indexmap/
2024-05-25 11:26:40 -07:00
..
lib.rs token: switch to using IndexMap for consistent ordering of entries 2024-05-25 11:26:40 -07:00
tests.rs token: test that permissions iteration order is consistent 2024-05-25 11:26:40 -07:00
util.rs Upgrade base64 2023-03-05 11:05:11 -07:00