| Commit message (Collapse) | Author | Age | Files | Lines |
| |\
| |
| |
| |
| |
| |
| | |
Removed unnecessary lint
Closes #2556
See merge request tpo/core/arti!4210
|
| | | |
|
| | | |
|
| | |
| |
| |
| | |
Removed unnecessary lint
|
| |/ |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| | |
|
| | |
|
| |
|
|
| |
in event_report!
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
| |
`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 allows call sites which have a `Bug` to add additional context,
beyond just the stack trace.
|
| |\
| |
| |
| |
| | |
Revert "retry-error: stop trying to dedup error msgs"
See merge request tpo/core/arti!3474
|
| | |
| |
| |
| |
| |
| |
| | |
This reverts commit e0efb477df868baf09d37de99e8e346136e66140.
There wasn't a consensus on this change, so sticking with the status
quo.
|
| | | |
|
| | | |
|
| | | |
|
| |/
|
|
|
|
|
| |
It makes more sense to have the conversion here, so it can use an
exhaustive match over ErrorKind.
This isn't the final API; I'm just moving the code from `arti`.
|
| | |
|
| |
|
|
| |
Run maint/add_warning
|
| |
|
|
| |
This feature has been removed from nightly, in favor of doc_cfg.
|
| |
|
|
|
|
|
|
|
|
| |
This is useful when you create an `internal!` error and then immediately
report it. If the `_report!` macro also requires a message, then you
need to provide two messages for the error, which doesn't always make
sense.
This is already possible anyways with `warn_report!(e,)`.
Now you don't need the comma.
|
| |
|
|
|
|
|
|
|
|
| |
This requires that we put the error in a field. There are two issues
that we'll fix in the next two commits:
1. Errors are no longer formatted with `ErrorReport`.
2. Errors will be in the first field, but long (or multiline) error
messages will cause other fields to be pushed to the end where
they're harder to find.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
| |
- Replaced `once_cell::unsync::Lazy` with `std::cell::LazyCell`.
Signed-off-by: hashcatHitman <[email protected]>
|
| |
|
|
|
|
|
| |
The `IoError::other` function is an easier way to say
`IoError::new(IoErrorKind::Other, ...)`. It's been around since
1.74, but clippy started warning about the more verbose version in
1.87.
|
| |
|
|
| |
Also, add a new ErrorKind for this sort of error.
|
| |
|
|
| |
This is needed to Report on the output of `StdError::source`.
|
| | |
|
| |
|
|
|
|
| |
Denies 'mod.rs' files for consistency.
https://rust-lang.github.io/rust-clippy/master/index.html#mod_module_files
|
| |
|
|
|
|
|
|
| |
In 1.83, this warning triggers on many of our crates.
We're thinking of fixing them all, but for now,
we're going to disable the warning.
This is part of #1765.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before:
```text
2024-10-29T01:57:31Z ERROR arti: error: internal error (bug) at crates/arti/src/lib.rs:378:27: foo
Backtrace [{ fn: "tor_error::internal::ie_backtrace::capture", file: "./crates/tor-error/src/internal.rs", line: 21 }, { fn: "tor_error::internal::Bug::new_inner", file: "./crates/tor-error/src/internal.rs", line: 105 }, { fn: "tor_error::internal::Bug::new", file: "./crates/tor-error/src/internal.rs", line: 94 }, { fn: "arti::main_main", file: "./crates/arti/src/lib.rs", line: 378 }, ...
```
After:
```text
2024-10-29T01:58:23Z ERROR arti: error: internal error (bug) at crates/arti/src/lib.rs:378:27: foo
0: tor_error::internal::ie_backtrace::capture
at ./crates/tor-error/src/internal.rs:21:27
1: tor_error::internal::Bug::new_inner
at ./crates/tor-error/src/internal.rs:105:24
2: tor_error::internal::Bug::new
at ./crates/tor-error/src/internal.rs:94:9
3: arti::main_main
at ./crates/arti/src/lib.rs:378:27
...
```
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
These are not regular ErrorKinds, since they can never occur in an
error that's meant to be returned from a Rust API like
`arti-client`. Instead, they only exist for errors returned from
RpcError.
(I can't find the place where we discussed this previously, but the
rationale is that if an ErrorKind never makes sense in response to
something that the user does from Rust, we should never have that be
an ErrorKind. The fact that the removed kinds do not actually
appear outside the RPC system suggests that this is reasonable.)
|
| |
|
|
|
|
| |
This is part of an effort to make arti-rpc-client-core (and future
similar tools) able to use our very-low-level crates
without depending on things they don't need.
|
| |\
| |
| |
| |
| | |
Add some more miri tests
See merge request tpo/core/arti!2502
|
| | | |
|
| |/
|
|
|
|
| |
These, like the other RPC-only error kinds, probably don't belong in
`tor-error`. But for now, that's where they all are, and moving
them is out of scope for this branch. See #1668.
|
| |
|
|
|
|
| |
The `derive_more` crate broke backward compatibility with this version,
so this change involved quite a few manual fixups.
With luck, they'll keep compatibility for some while in the future.
|
| |\
| |
| |
| |
| | |
RPC: Method to expose a list of RPC methods.
See merge request tpo/core/arti!2332
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
`void::Void` represents the type of an object that can't be
constructed. It's especially useful as the error type of an
infallible function. `void::Void` already implements
`std::error::Error`, so all we need to do to use it as a "can't
happen" error type in our code is to have it also implement
`HasKind`.
Also implement HasKind for Infallible while we're at it.
|
| |/
|
|
|
| |
Removes resolve_backtraces from rtmock since it is no longer needed as
stdlib's backtraces automatically lazily resolve without needing a &mut.
|
| | |
|
| |
|
|
|
| |
We've wanted separate error codes for "no such method exists" and
"this method exists, but this object doesn't have it."
|
| |
|
|
| |
This commit is automatically generated.
|
| | |
|