| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| | |
|
| |
|
|
| |
Run maint/add_warning
|
| | |
|
| |
|
|
|
|
|
|
|
|
| |
The two main causes of errors were:
- Since some of the lifetime rules have changed, we no longer need
to do as many "bind a variable and immediately return it"
patterns, and so clippy now warns about them.
- We needed to adjust the explicit captures (`use<...>`)
in a couple of our RPIT instances.
|
| |
|
|
|
| |
"Suppress" rather than "fix": this pattern is intentional, and
makes it clear that we're doing an exhaustive match.
|
| |
|
|
|
| |
These are the call sites where using this fucntion is correct.
(Outside tor-rtmock, which we'll do separately.)
|
| |\
| |
| |
| |
| |
| |
| | |
memquota architecture documentation
Closes #1660
See merge request tpo/core/arti!2509
|
| | | |
|
| |/ |
|
| |\
| |
| |
| |
| | |
Provide and implement SinkCloseChannel
See merge request tpo/core/arti!2485
|
| | | |
|
| | | |
|
| | |
| |
| |
| |
| |
| | |
Implement SinkTrySend for BustedSink.
Implement SinkTrySendError for BustedError.
Add an is_disconnected field (so we can test different error paths).
|
| | | |
|
| |/
|
|
| |
This will let us test different errors.
|
| |
|
|
| |
Plumbing.
|
| |\
| |
| |
| |
| | |
Provide a type-erased SleepProvider + CoarseTimeProvider and use it for memquota queues
See merge request tpo/core/arti!2460
|
| | |
| |
| |
| | |
Nothing uses this yet, but we will do so.
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Use tor_rtcompat::DynTimeProvider instead.
Ultimately, we're going to want one of these in Channel etc. The
CoarseTimeProvider generic argument then becomes pervasive.
Instead, erase it. This will involve an indirect function call each
time an item is inserted. I think that can't be helped.
|
| | |
| |
| |
| |
| |
| | |
It doesn't need an owned value here.
(clippy's note about this was defeated by this being a trait method.)
|
| | | |
|
| |/ |
|
| |
|
|
| |
Remove extraneous text, wrap it, and change to a more declarative style.
|
| | |
|
| |
|
|
|
|
| |
This detect possibly-panicking operations.
Empirically this lint seems rather better now.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Allow a `Config` to represent "this is supposed to be disabled".
This involves wrapping the actual built configuration in an IfEnabled.
We treat max = usize::MAX, or max being unspecified, as "disable".
We can now reporting an error during config building if max is set but
we're compiling the feature out. Conversely, we can now make
`MemoryQuotaTracker::new()` unconditional, since enabled
confiogurations are uninhabited when the feature is compiled out.
We change how we derive the setters, deriving them from the Builder.
I chose to abolish the use of derive_builder. See the new comment on
ConfigBuilder.
|
| | |
|
| |\
| |
| |
| |
| | |
Add and use `PeekableStream` and `UnobtrusivePeekableStream`
See merge request tpo/core/arti!2345
|
| | | |
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| | |
This will hopefully allow much caller code to be compiled out.
The users (IsParticipant impls) don't generally need to bother with
it - they can just ignore it.
|
| |/
|
|
|
|
|
| |
Now if we run doctests without the feature enabled, we test that a
no-op MemoryQuotaTracker works.
Those tests aren't currently run in CI, but they will be after !2350.
|
| |
|
|
| |
We use `debug!` (tracing logging) everywhere else. Use it here too.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
| |
Each queue has two `Participation`s, not just one.
This didn't matter in the `lifecycle` test, because one of the two
Participations was never touched since it was cloned, and a fresh
clone starts out with a cache of zero.
But we're about to reuse this code in a context where both
Participations end up with a cache.
|
| | |
|
| |
|
|
|
| |
Discussed here
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/2292#note_3059928
|
| |
|
|
| |
It's not a unit. It's `MpscUnboundedSpec` that's a unit
|
| |
|
|
|
|
|
| |
And MpscUnboundedSpec too.
As discussed in
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/2292#note_3059516
|
| |
|
|
|
| |
Prompted by
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/2292#note_3059543
|
| |
|
|
|
| |
As per
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/2292#note_3059520
|
| |
|
|
|
| |
Fixes the livelock possibility discussed here
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/2292#note_3059519
|
| |
|
|
|
| |
Prompted by
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/2292#note_3059518
|
| |
|
|
|
| |
Requested by
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/2292#note_3059517
|
| | |
|
| | |
|
| |
|