| Commit message (Collapse) | Author | Age | Files | Lines |
| | |
|
| |
|
|
| |
Removed unnecessary lint
|
| | |
|
| |
|
|
|
|
|
|
| |
This commit adds #[allow(clippy::string_slice)] to all functions in the
code where string slices are used, alongside a TODO comment.
We do this add the function header to have it consistent, as things like
expression based allow's are still experimental.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
| |
This is part of rationalizing the structure of TorClient so we can
refactor startup logic, and so that RPC code can reason about object
identity. See #2469.
|
| |
|
|
|
|
|
|
|
|
|
| |
When the circ-padding feature is enabled, we use maybenot, which does
not yet support rand 0.10. In the meantime, enabling this feature pulls
in rand 0.9. This is not ideal, but should be okay as a temporary
situation.
This also replaces the use of ReseedingRng (which was removed in 0.10)
with the reseeding_rng crate. This is somewhat less performant, but it
should be okay.
|
| |
|
|
|
| |
This enables the rpc client to call "arti:describe_path" and similar
methods on streams constructed via this mechanism.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
The important thing here is that we need to look up the object
_after_ we invoke any non-dispatched methods, since the object might
be an expired weak reference.
This required some related changes to tests and error types.
Additionally, it required us to change the return value of
Context::remove, since we can remove objects that are not completely
present.
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
| |
The removed tests are ones that no longer make sense given our
simplified behavior.
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
| |
We no longer plan to have all weak-refs automatically de-duplicated,
for reasons discussed at #868. This lets us discard a lot of code,
including code to check for Arc/weak identity.
I've disabled some unit tests here, but I'll add them back or
rewrite them (or discard them as irrelevant) by the end of the branch.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Closes #2418.
Fixes TROVE-2026-005, where we would use a less cryptographically
secure (and probably less DoS resistant) hash function for these
tables if:
- We are built alongside another crate that uses `weak-table`
- That crate enables the `weak-table/ahash` feature.
- We are running on a system without hardware AES.
Severity: Low
|
| |\
| |
| |
| |
| | |
Fix various typos
See merge request tpo/core/arti!3781
|
| | | |
|
| | |
| |
| |
| | |
This makes it a little easier to drop unwanted capabilities.
|
| | |
| |
| |
| |
| | |
The Connection will know the options that the listener was created
with, as opposed to RpcMgr, which is the same for every listener.
|
| |/
|
|
|
| |
(For now, the su capability doesn't actually do anything,
and there is no ability to actually have a session start with one.)
|
| |
|
|
|
|
|
|
|
| |
`clippy::collapsible_if` started triggering after bumping the MSRV to
1.88.
Since this triggers from a lot of places, and since there even are a
couple of instances where we explicitly allow `clippy::collapsible_ifs`,
I've opened #2342 for deciding what to do about it.
|
| |
|
|
| |
This adds the lint to all our crates.
|
| |
|
|
|
|
|
| |
This should never have been retained when we refactored our channels
for reporting responses into a single channel.
The bug became apparent when quicktest became derived from debug.
|
| | |
|
| |
|
|
| |
Run maint/add_warning
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
Edited-by: Nick Mathewson <[email protected]>
|
| |
|
|
|
|
|
|
|
|
|
|
| |
The `stream` module is client-specific, for the most part, so I am
moving it under `client`. Later on, we will factor out the parts that
can be shared with the relay implementation.
Note: this is a breaking change as the deleted `stream` module was
`pub`. We could've kept the module and reexported from it the public
types from `tor_proto::client::stream`, but I think it's better to have
this `client` namespacing, because it makes the separation between the
client and relay parts clearer.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
| |
See #2060.
|
| | |
|
| |
|
|
|
| |
Fixes several warnings from
cargo check --workspace --no-default-features
|
| | |
|
| |
|
|
| |
- The Rng::gen() functions have been renamed to Rng::random().
|
| |
|
|
| |
- `rand::thread_rng()` has been deprecated and renamed to `rand::rng()`
|
| |
|
|
|
|
|
| |
MockSleepProvider and MockSleepRuntime have been declared deprecated
by the docs for some time. We're about to mark them `#[deprecated]`.
This commit has been split out for clarity of review.
|
| |
|
|
|
| |
This fixes an "operator precedence can trip the unwary" warning that
showed up after I updated my toolchain to 1.85.
|
| |\
| |
| |
| |
| |
| |
| | |
rpc: Document what is actually going on with stream optimism.
Closes #1583
See merge request tpo/core/arti!2753
|
| | |
| |
| |
| |
| |
| |
| |
| | |
In brief: we _do_ correct implement correct optimistic vs
nonoptimistic behavior for RPC streams. Only our documentation was
wrong. Subsequent commits will fix our documentation more.
See #1583.
|
| | |
| |
| |
| |
| | |
Since these return a client-specific type,
they need a client-specific name before we can stabilize them for RPC.
|
| | |
| |
| |
| |
| |
| | |
The API for this type, and the fact that it implements
ClientStreamCtrl unconditionally, means that it is only for client
DataStreams.
|