summaryrefslogtreecommitdiff
path: root/crates
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | | | tor-proto circuit: Make reactor::run_once modulae-privateIan Jackson2023-06-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Nothing else wants this and having it pub(super) is confusing.
* | | | | | Merge branch 'recurse' into 'main'Alexander Færøy2023-07-101-26/+37
|\| | | | | | |/ / / / |/| | | | | | | | | | | | | | tor-hsclient: Mock traits: Work around an async boobytrap See merge request tpo/core/arti!1365
| * | | | tor-hsclient: Mock traits: Work around an async boobytrapIan Jackson2023-06-301-26/+37
| | | | |
* | | | | Merge branch 'clippy-vec' into 'main'Nick Mathewson2023-07-102-3/+3
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Fix new "useless_vec" warning from clippy +nightly See merge request tpo/core/arti!1395
| * | | | | Fix new "useless_vec" warning from clippy +nightlyIan Jackson2023-07-102-3/+3
| | |/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Explanation at https://rust-lang.github.io/rust-clippy/master/index.html#/useless_vec This is the non-tests subset of the same-named commmit in !1388, (recreated by hand by me, and then checked against that commit; I stole the commit message from Nick's.) This should be uncontroversial I think.
* | | | | Remove some needless into_iter() calls.Nick Mathewson2023-07-102-7/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Clippy nightly now detects when you're calling into_iter() and passing the result into something that accepts an `impl IntoIterator`.
* | | | | Add exceptions for some cases of diverging_sub_expressionNick Mathewson2023-07-104-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | See here for documentation on the lint: https://rust-lang.github.io/rust-clippy/master/index.html#/diverging_sub_expression The issue here, from what I can tell, is that the lint triggers whenever you use a diverging expression as a function body within an
* | | | | Add an exception for clippy::arc_with_non_send_sync.Nick Mathewson2023-07-101-0/+1
|/ / / / | | | | | | | | | | | | We're doing this deliberately, I believe.
* | | | Merge branch 'da-task' into 'main'gabi-2502023-07-105-72/+73
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | RFC: tor-rtmock: Use derive-adhoc for composite runtimes See merge request tpo/core/arti!1381
| * | | | tor-rtmock: Use derive-adhoc for composite runtimesIan Jackson2023-07-075-72/+73
| | | | |
* | | | | Update documentation regarding the `onion-service-client` featureKunal Mehta2023-07-072-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | | It is no longer experimental, but still not rated for security-sensitive usage per <https://blog.torproject.org/arti_116_released/>.
* | | | | Fix warn_report and error_report macros.Nick Mathewson2023-07-071-4/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Originally they didn't check err.kind(), since err.kind() can never increase their severity. We lost that behavior with !1386, and we became dependent on it with arti!1383. Since they both merged at the same time, CI broke. This patch restores their original behavior.
* | | | | Merge branch 'feat' into 'main'Nick Mathewson2023-07-071-1/+10
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | arti: Build with HS client support by default Closes #948 See merge request tpo/core/arti!1382
| * | | | | arti: Build with HS client support by defaultIan Jackson2023-07-071-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | Fixes #948
| * | | | | arti Cargo.tomL: wrap default features listIan Jackson2023-07-071-1/+9
| |/ / / /
* | | | | Merge branch 'event_report_everywhere' into 'main'Nick Mathewson2023-07-0726-116/+98
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Throughout: Use event_report!() macros for reporting Errors. Closes #949 See merge request tpo/core/arti!1383
| * | | | | Throughout: Use *_report!() macros for reporting Errors.Nick Mathewson2023-07-0726-116/+98
| | |_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I identified the cases to replace by searching for the string `.report()`. There are a few that I didn't change: * A couple of cases that used anyhow::Error, * One case that reported two Errors. * Two cases in `tor_hsclient::err` that just did `error!("Bug: {}")`. I have also not audited the cases in `tor-hsclient` where we're using `tor_error::Report` manually. Nonetheless, closes #949.
* | | | | be more lenient while parsing inner hs desctrinity-1686a2023-07-071-1/+6
| | | | |
* | | | | Merge branch 'report' into 'main'Ian Jackson2023-07-072-92/+55
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | tor-error: tracing module: Use macro to generate macros See merge request tpo/core/arti!1386
| * | | | | tor-error: tracing module: Use macro to generate macrosIan Jackson2023-07-072-91/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This abolishes some quintuplication. The output is identical except that: * The syntax display in the rustdoc output for the resulting macros seems to have somewhat less whitepsace. * The whimsical error messages in the examples are all identical. Ah well.
| * | | | | tor-error: tracing module: Fix link to tracing macroIan Jackson2023-07-071-1/+1
| |/ / / /
* | | | | Merge branch 'inclusive' into 'main'Nick Mathewson2023-07-074-4/+4
|\ \ \ \ \ | |/ / / / |/| | | | | | | | | | | | | | rng ranges: Use inclusive Duration ranges in several places See merge request tpo/core/arti!1385
| * | | | rng ranges: Use inclusive Duration ranges in several placesIan Jackson2023-07-074-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Many of these call sites would panic if, somehow, the upper bound was zero. In most cases it is very complicated to see if whether this could happen. However, there is a better answer: Durations are (conceptually) dense, so picking the closed set (which includes its boundary) rather than the open one (which doesn't) will make little practical difference. So change four call sites to use `..=` instead of just `..`.
* | | | | Merge branch 'report-bugs-v2' into 'main'Nick Mathewson2023-07-079-44/+229
|\ \ \ \ \ | |/ / / / |/| | | | | | | | | | | | | | Optional tracing support in tor-error for error reporting See merge request tpo/core/arti!1379
| * | | | event_report: assert correctness of format endingNick Mathewson2023-07-072-0/+23
| | | | | | | | | | | | | | | | | | | | | | | | | (Also, document that this static assertion is the reason why you are seeing a confusing error message.)
| * | | | circmgr: Use event_report!() and similar macrosNick Mathewson2023-07-076-43/+30
| | | | | | | | | | | | | | | | | | | | This simplifies our logging a little, and implements part of
| * | | | tor-error: Add optional tracing supportNick Mathewson2023-07-073-1/+176
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The main contribution here is a set of convenience macros for logging error `Report`s. Notably, this macros always logs `Internal` and `BadAspiUsage` errors at `WARN`, unless they are already at `ERROR` or more. This is a little tricky because `tracing::event!()` requires its Level argument to be a constant.
* | | | Merge branch 'allow_missing_panics' into 'main'Ian Jackson2023-07-0750-59/+2
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | add_warning: Tolerate clippy::missing_panics_doc Closes #950 See merge request tpo/core/arti!1380
| * | | | Remove explicit allows for missing_panics_docs.Nick Mathewson2023-07-066-14/+2
| | | | | | | | | | | | | | | | | | | | These are no longer needed.
| * | | | Run add_warning to remove `missing_panics_doc` deny.Nick Mathewson2023-07-0645-45/+0
| |/ / / | | | | | | | | | | | | Closes #950.
* | | | Merge branch 'clippy-nightly-20230703' into 'main'Nick Mathewson2023-07-076-15/+15
|\ \ \ \ | |/ / / |/| | | | | | | | | | | | | | | | | | | Fix various warnings from clippy nightly Closes #943 See merge request tpo/core/arti!1369
| * | | Avoid matches!(x, None), matches!(x, Ok(_))Nick Mathewson2023-07-063-5/+5
| | | | | | | | | | | | | | | | This appeases clippy-nightly.
| * | | tor-rtcompat: Simplify trivial all() expressions.Nick Mathewson2023-07-062-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Clippy nightly doesn't like `#[cfg(all(...))]` with only a single expression inside the `all(...)`. This requires an adjustment in check_doc_features.
| * | | tor-config: Use next_back() instead of rev().next()Nick Mathewson2023-07-031-1/+1
| |/ / | | | | | | | | | This is a new warning^Wsuggestion from clippy nightly.
* | | tor-rtmock: statically assert that the macro makes a Runtime implIan Jackson2023-07-061-0/+6
| | |
* | | tor-rtmock: Use the same specified field for BlockOn and SpawnIan Jackson2023-07-064-10/+8
| | | | | | | | | | | | These are always the same and probably always will be.
* | | Merge branch 'task4' into 'main'Ian Jackson2023-07-0613-453/+1481
|\ \ \ | | | | | | | | | | | | | | | | Introduce a MockExecutor for fully-isolated test cases See merge request tpo/core/arti!1375
| * | | tor-rtmock: Add semver.mdIan Jackson2023-07-061-0/+3
| | | |
| * | | tor-rtmock: task: Fix a typoIan Jackson2023-07-061-1/+1
| | | | | | | | | | | | | | | | | | | | As per https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/1375#note_2919976
| * | | tor-rtmock: task: clarify progress_until_stalled a littleIan Jackson2023-07-062-1/+5
| | | |
| * | | tor-rtmock: Runtime: Expand on "allowed" documentationIan Jackson2023-07-061-3/+33
| | | |
| * | | tor-rtmock: task: Remove a () assignmentIan Jackson2023-07-061-1/+1
| | | | | | | | | | | | | | | | | | | | Discussion: https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/1375#note_2919928
| * | | tor-rtmock: task: Abolish TaskFutureInfo alias (fmt)Ian Jackson2023-07-061-1/+3
| | | |
| * | | tor-rtmock: task: Abolish TaskFutureInfo aliasIan Jackson2023-07-061-7/+6
| | | | | | | | | | | | | | | | | | | | Requested by: https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/1375#note_2919926
| * | | tor-rtmock: Net: Make UDP sockets un-constructableIan Jackson2023-07-061-14/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This will hopefully mean anyone trying to use this will notice that it's not implemented. Prompted by: https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/1375#note_2919925
| * | | tor-rtmock: Add a cross-reference from MockSleepRuntime::wait_forIan Jackson2023-07-061-0/+4
| | | |
| * | | tor-dirmgr: bridge descriptor tests: Add a missing #[traced_test]Ian Jackson2023-07-061-0/+1
| | | | | | | | | | | | | | | | This seems to have been overlooked.
| * | | tor-dirmgr: bridge descriptor tests: Use MockRuntime (drop Tokio dep)Ian Jackson2023-07-061-1/+0
| | | | | | | | | | | | | | | | This isn't used any more.
| * | | tor-dirmgr: bridge descriptor tests: Use MockRuntime (fmt)Ian Jackson2023-07-061-270/+271
| | | | | | | | | | | | | | | | Run rustfmt.
| * | | tor-dirmgr: bridge descriptor tests: Use MockRuntimeIan Jackson2023-07-061-35/+25
| | | | | | | | | | | | | | | | This abolishes a bodge sleep. It should make the tests deterministic.