| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
| |
This panics on error, and we're fine with a panic on misbehavior in
tests.
|
| |
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
| |
This is precisely the result of running the rune in
maint/adhoc-add-lint-blocks.
|
| |
|
|
|
|
|
| |
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.
|
| |
|
|
|
| |
This will help avoid the programmer making the mistake I made here:
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/852#note_2854029
|
| |
|
|
|
| |
We do want to test this with a non-Option type, but we are going to
have to wrap it up.
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
| |
This is currently nightly-only and is blocked on an unresolved API
question:
https://github.com/rust-lang/rust/issues/71503
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
| |
Apparently cargo fmt doesn't like these, which my perl rune didn't
delete.
This commit is precisely the result of `cargo fmt`.
|
| |
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
| |
This lint exists for perf reasons, and this is rarely relevant in
tests.
Using double quoted str is generally cognitively less burdensome.
|
| |
|
|
|
| |
For whatever reason, rustdoc didn't like these multiline strings
in `doc` attributes.
|
| |
|
|
| |
Otherwise, there is a parsing ambiguity. :(
|
| |
|
|
|
| |
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.
|
| |
|
|
| |
I am finding as I use this that I want a variant that can't panic.
|
| | |
|
| |
|
|
| |
Doing this lets us work with defaults and const generics.
|
| |
|
|
| |
This prevents an explosion if somebody has a key called "values".
|
| |
|
|
|
| |
It doesn't work for const generics yet, since they can't be repeated
in quite the same way.
|
| |
|
|
| |
Most of these were suggested by Ian
|
| |
|
|
|
| |
The previous indentation was making it think that we had rust code
where none existed.
|
| |
|
|
| |
Also, document another invariant.
|
| | |
|
| | |
|
| |
|
|
| |
This can't be used in a consistency-preserving way.
|
| |
|
|
|
|
|
|
| |
Using Option<T> as an alias for T was too clever indeed, and it
meant that our HashMaps were declared with the wrong types.
Putting flags here instead gives us an extension point that we can
use in the future.
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
| |
Every element in the set has up to N keys, each of which may have differnt
types. No value for any key may correspond to more than one element in
the set.
These properties can be provided, via a macro, for values of N between 1
and $BIG_ENOUGH.
We'll use this to implement a type that holds HasRelayIds.
|
| | |
|
| |
|
|
|
| |
We're going to want this functionality, which isn't in the stable
stdlib.
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
| |
In answer to
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/632#note_2822107
I think this is subtle enough that it deserves a comment.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
There are going to be some tasks (well, right away, one task) which
will want to go away when the sender is dropped.
The docs in postage are silent, but postage::watch::Sender does not
have a Drop impl so I don't think we can rely on the Receivers getting
None from their Stream impl.
So we're going to have the watch send Options, which are None only
when the sender is dropped.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
We need to replace the AtomicBool for dormant mode with something that
can wake up tasks. postage::watch is the right shape.
But we want to be able to update it but suppress no-op updates.
(There is going to be a call site where no-op updates can occur.)
In the absence of a suitable upstream method as requested here
https://github.com/austinjones/postage-rs/issues/56
we introduce this facility via an extension trait.
|
| |\
| |
| |
| |
| | |
Clean-ups in circmgr errors
See merge request tpo/core/arti!625
|
| | |
| |
| |
| |
| |
| |
| |
| | |
This interface allows using FilterCount with functions that expect
predicates rather than iterator chains.
I'm about to use it to get meaningful FilterCount results in the
path-selection code in circmgr.
|
| |/
|
|
| |
This type must have been renamed, I guess.
|
| | |
|