Gabriela Moldovan
6b9e37e07c
tor-netdir: Shuffle the list of HS dirs used for downloading descriptors.
...
We'll probably need the hsdir list to be shuffled deterministically for
testing purposes (this might be desirable, for example, when we write a
test for HS descriptor download retries).
Signed-off-by: Gabriela Moldovan <gabi@torproject.org>
2023-05-04 17:53:58 +01:00
Nick Mathewson
1904cfc8b9
Increment crate versions.
...
Because of the errorkind bumps, we're calling this a breaking change
in everything lower-level than `arti`.
Generated with:
```
cargo set-version -p tor-basic-utils --bump minor
cargo set-version -p tor-async-utils --bump minor
cargo set-version -p caret --bump minor
cargo set-version -p fs-mistrust --bump minor
cargo set-version -p safelog --bump minor
cargo set-version -p retry-error --bump minor
cargo set-version -p tor-error --bump minor
cargo set-version -p tor-config --bump minor
cargo set-version -p tor-events --bump minor
cargo set-version -p tor-units --bump minor
cargo set-version -p tor-rtcompat --bump minor
cargo set-version -p tor-rtmock --bump minor
cargo set-version -p tor-rpcbase --bump minor
cargo set-version -p tor-llcrypto --bump minor
cargo set-version -p tor-protover --bump minor
cargo set-version -p tor-bytes --bump minor
cargo set-version -p tor-hscrypto --bump minor
cargo set-version -p tor-socksproto --bump minor
cargo set-version -p tor-checkable --bump minor
cargo set-version -p tor-cert --bump minor
cargo set-version -p tor-linkspec --bump minor
cargo set-version -p tor-cell --bump minor
cargo set-version -p tor-proto --bump minor
cargo set-version -p tor-netdoc --bump minor
cargo set-version -p tor-consdiff --bump minor
cargo set-version -p tor-netdir --bump minor
cargo set-version -p tor-congestion --bump minor
cargo set-version -p tor-persist --bump minor
cargo set-version -p tor-chanmgr --bump minor
cargo set-version -p tor-ptmgr --bump minor
cargo set-version -p tor-guardmgr --bump minor
cargo set-version -p tor-circmgr --bump minor
cargo set-version -p tor-dirclient --bump minor
cargo set-version -p tor-dirmgr --bump minor
cargo set-version -p tor-hsclient --bump minor
cargo set-version -p tor-hsservice --bump minor
cargo set-version -p arti-client --bump minor
cargo set-version -p arti-rpcserver --bump minor
cargo set-version -p arti-config --bump minor
cargo set-version -p arti-hyper --bump minor
cargo set-version -p arti --bump patch
cargo set-version -p arti-bench --bump patch
cargo set-version -p arti-testing --bump patch
```
2023-05-03 08:31:11 -04:00
Nick Mathewson
104d64589d
Increment MSRV to 1.65 in every crate.
2023-04-11 15:31:12 -04:00
Ian Jackson
7f51394e6e
impl_debug_hex: Fix syntax error in usage template
...
Corrects the doc and fixes a rustdoc warning.
2023-04-11 19:31:10 +01:00
Ian Jackson
9de3c1e307
tor-basic-utils: Provide impl_debug_hex
2023-03-31 19:10:06 +01:00
Nick Mathewson
2ab5348ab2
Remove semver.md files.
2023-03-31 09:24:41 -04:00
Nick Mathewson
e208fb15ad
Bump crate versions that have breaking changes
...
These crates have had breaking changes. They are pre-1.0, so they get
a minor bump.
```
tor-basic-utils
tor-config
```
2023-03-31 08:28:06 -04:00
Nick Mathewson
a62affd66e
Move functionality from tor_basic_utils to tor_async_utils
...
This commit is mostly code movement; I'd recommend reviewing it
with git's `--color-moved` option.
2023-03-29 13:57:11 -04:00
Ian Jackson
c1ae509ce6
Introduce and use ends_with_ignore_ascii_case
...
As per
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/1056#note_2884428
2023-03-08 18:27:42 +00:00
Ian Jackson
440a0eb74f
tor-basic-utils: Provide str.strip_suffix_ignore_ascii_case
...
We're going to want this for cheaply stripping ".onion" from things.
2023-03-08 17:26:47 +00:00
Nick Mathewson
592d6bf8a3
Bump the patch version of each crate with _trivial_ changes.
...
These crates have not had changes to their behavior; as such it is
not necessary to bump their dependencies to require the new versions.
2023-02-01 10:10:36 -05:00
Nick Mathewson
a6dd92843e
Allow clippy::unchecked_duration_subtraction in tests
...
This panics on error, and we're fine with a panic on misbehavior in
tests.
2023-01-27 08:28:02 -05:00
Nick Mathewson
bf04641c68
Disable clippy::unlinlined-format-args
...
This warning kind of snuck up on us! (See #748 ) For now, let's
disable it. (I've cleaned it up in a couple of examples, since
those are meant to be more idiomatic and user-facing.)
Closes #748 .
2023-01-27 08:27:47 -05:00
eta
118050e54c
Merge branch 'test-lints' into 'main'
...
Add test lint blocks to all "mod test"
See merge request tpo/core/arti!937
2023-01-06 17:16:09 +00:00
Emil Engler
8579bc66a8
doc: consistent summary line for the READMEs
...
This commit introduces a consistency to the summary line of all
README.md files in each and every crate.
2022-12-20 14:31:47 +01:00
Ian Jackson
125a455bdc
test lint blocks: Add many many automatically
...
This is precisely the result of running the rune in
maint/adhoc-add-lint-blocks.
2022-12-12 18:00:30 +00:00
Ian Jackson
baf78361e8
test lint blocks: Do some semi-manually
...
This is the hunks from running the rune in maint/adhoc-add-lint-blocks
but which require some subsequent manual fixup: usually, deleting
now-superfluous outer allows, but in some cases manually putting back
lints that the adhoc script deleted.
2022-12-12 18:00:29 +00:00
Nick Mathewson
e0aeda3071
Remove semver.md files now that 1.1.0 is released.
2022-11-30 17:10:29 -05:00
Nick Mathewson
38bef96b99
Bump the minor version of every crate.
...
We made this job easy this time around: by incrementing our MSRV, we
have forced ourselves to do at least a minor bump everywhere.
2022-11-30 15:10:16 -05:00
Ian Jackson
c82cda85d6
tor-basic-utils: DropNotifyWatchSender: use DropNotifyEofSignallable
...
This will help avoid the programmer making the mistake I made here:
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/852#note_2854029
2022-11-23 17:50:05 +00:00
Ian Jackson
63a799a118
tor-basic-utils: DropNotifyWatchSender test: introduce I
...
We do want to test this with a non-Option type, but we are going to
have to wrap it up.
2022-11-23 17:50:01 +00:00
Ian Jackson
91536da10a
tor-basic-utils: Provide helper for serde flexible parsing
2022-11-21 14:58:24 +00:00
Nick Mathewson
936920b26e
bump rust-version to 1.60 in every crate.
2022-11-10 10:57:33 -05:00
Ian Jackson
f50da3efa1
define_accessor_trait: Allow specification of other items
2022-11-03 15:43:41 +00:00
Ian Jackson
64de9f74be
define_accessor_trait: Allow specification of supertraits
2022-11-03 15:43:41 +00:00
Nick Mathewson
932fe48eaf
Run add_warnings.
2022-11-03 11:06:02 -04:00
Ian Jackson
48f48841e1
Require derive_more 0.99.3
...
0.99.[012] have a bug https://github.com/JelteF/derive_more/issues/114
which makes the Deref derive for bridgedesc::StateGuard not work
and therefore breaks minimal-versions CI.
It seems simpler to require the newer version everywhere.
2022-11-03 11:37:23 +00:00
Ian Jackson
9796d615f8
tor-basic-utils: Provide an implementation of BinaryHeap::retain
...
This is currently nightly-only and is blocked on an unresolved API
question:
https://github.com/rust-lang/rust/issues/71503
2022-10-27 10:46:03 +01:00
Nick Mathewson
15ac14a5d9
n_key_set: clean up some wide lines
2022-10-24 08:08:56 -04:00
Nick Mathewson
ef1c0cd282
n_key_set: Re-insert by_foo_mut() accessors, but make them unsafe.
2022-10-24 08:04:02 -04:00
Nick Mathewson
d648446201
Fix some litter in a doc comment.
2022-10-24 07:59:42 -04:00
Nick Mathewson
24e62d3197
n_key_set: Add ability to modify entries in the map.
...
The keys can change: if they do, then the entry is removed from its
previous position and inserted at the new one, possibly displacing
others.
2022-10-24 07:58:45 -04:00
Ian Jackson
f84d8777db
cargo fmt to remove blank lines
...
Apparently cargo fmt doesn't like these, which my perl rune didn't
delete.
This commit is precisely the result of `cargo fmt`.
2022-10-12 15:29:04 +01:00
Ian Jackson
d9910dba08
Replace all README copies in src/lib.rs with includes
...
The feature we want is `#[doc = include_str!("README.md")]`, which is
stable since 1.54 and our MSRV is now 1.56.
This commit is precisely the result of the following Perl rune:
perl -i~ -0777 -pe 's{(^//!(?!.*\@\@).*\n)+}{#![doc = include_str!("../README.md")]\n}m' crates/*/src/lib.rs
2022-10-12 15:29:03 +01:00
Ian Jackson
82ad9eea5f
Allow "clippy::single_char_pattern" in tests.
...
This lint exists for perf reasons, and this is rarely relevant in
tests.
Using double quoted str is generally cognitively less burdensome.
2022-10-12 13:50:29 +01:00
Nick Mathewson
5a5f96aa37
n_key_set: Fix bugs in API documentation.
...
For whatever reason, rustdoc didn't like these multiline strings
in `doc` attributes.
2022-10-04 16:05:40 -04:00
Nick Mathewson
f8382d4978
n_key_set: Wrap "where" clauses in square brackets too.
...
Otherwise, there is a parsing ambiguity. :(
2022-10-04 16:05:40 -04:00
Nick Mathewson
8475d3ab39
n_key_set: Rename generic parameters on functions.
...
Previously we used `<T>` in a bunch of places. But that fails
if you try to declare `T` as a parameter on the structure itself.
2022-10-04 16:05:40 -04:00
Nick Mathewson
bf7c0bb2ba
n_key_set: Add a try_insert().
...
I am finding as I use this that I want a variant that can't panic.
2022-10-04 16:05:40 -04:00
Nick Mathewson
7402578af4
Merge branch 'multi_keyed_set' into 'main'
...
Include a HashSet variant that can be keyed on multiple keys.
See merge request tpo/core/arti!747
2022-10-03 18:16:10 +00:00
Nick Mathewson
1329f2c8f3
n_key_set: fix doctest compilation.
2022-10-03 13:31:03 -04:00
Nick Mathewson
8ab2a88923
n_key_set: Update generic syntax
...
Doing this lets us work with defaults and const generics.
2022-10-03 13:31:01 -04:00
Nick Mathewson
857272bc7a
n_key_set: rename map elements.
...
This prevents an explosion if somebody has a key called "values".
2022-10-03 13:31:01 -04:00
Nick Mathewson
9c08fdb865
n_key_set: Add support for generic lifetimes.
...
It doesn't work for const generics yet, since they can't be repeated
in quite the same way.
2022-10-03 13:31:01 -04:00
Nick Mathewson
48a15d5627
Tweaks and improvements in documentation.
...
Most of these were suggested by Ian
2022-10-03 13:31:01 -04:00
Nick Mathewson
4724639d7c
Require slab 0.4.4
...
The `try_remove()` method, which we need, was introduced there.
2022-10-03 13:31:01 -04:00
Nick Mathewson
59f1f7c11d
Repair rustdoc.
...
The previous indentation was making it think that we had rust code
where none existed.
2022-10-03 13:31:01 -04:00
Nick Mathewson
9fd072a4d4
n_key_set: Add a function to check invariant violations
...
Also, document another invariant.
2022-10-03 13:31:01 -04:00
Nick Mathewson
0dc1573268
n_key_set: Use remove_by_foo to implement insert.
2022-10-03 13:31:01 -04:00
Nick Mathewson
e06ae79009
n_key_set: Panic on more invariant and constraint violations.
2022-10-03 13:31:01 -04:00