aboutsummaryrefslogtreecommitdiff
path: root/crates/tor-error/src/retriable.rs
Commit message (Collapse)AuthorAgeFilesLines
* maint: Run maint/add_warning to deny string slicesClara Engler2026-06-091-0/+1
| | | | | | | | | | | | 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.
* tor-error: Port to web-time-compat.Nick Mathewson2026-03-261-9/+9
|
* Fix name of clippy lint to unchecked_time_subtraction (2)Ian Jackson2025-11-061-1/+1
| | | | Run maint/add_warning
* tor-error: Removed dependency on `once_cell`hashcatHitman2025-06-131-2/+1
| | | | | | - Replaced `once_cell::unsync::Lazy` with `std::cell::LazyCell`. Signed-off-by: hashcatHitman <[email protected]>
* Run maint/add_warning.Nick Mathewson2024-03-131-0/+1
|
* Run maint/add_warning to add lint block everywhereIan Jackson2023-08-231-0/+1
|
* Run maint/add_warning to actually apply new lint allowsIan Jackson2023-07-101-0/+1
|
* tor-error: Introduce `LooseCmpRetryTime`Ian Jackson2023-06-151-0/+19
| | | | | Having a newtype for this kind of thing is considerably more convenient. I'm going to use this in a moment.
* Allow clippy::unchecked_duration_subtraction in testsNick Mathewson2023-01-271-0/+1
| | | | | This panics on error, and we're fine with a panic on misbehavior in tests.
* test lint blocks: Add many many automaticallyIan Jackson2022-12-121-0/+9
| | | | | This is precisely the result of running the rune in maint/adhoc-add-lint-blocks.
* tor-error: make HasRetryTime object-safeIan Jackson2022-10-211-0/+1
| | | | | | | | We could in the future provide a version of abs_retry_time which took an &dyn closure if that turns out to be wanted. I think this isn't a semver break because trait implementors are allowed to relax bounds.
* Fix grammar and typosSamanta Navarro2022-04-271-1/+1
|
* AbsRetryTime::from_sum: Provide a test caseIan Jackson2022-04-251-0/+15
| | | | | As requested in https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/470#note_2798015
* AbsRetryTime::from_sum: Add missing full stopIan Jackson2022-04-251-1/+1
| | | | | As per https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/470#note_2797945
* retry-error: Provide AbsRetryTime::from_sub and use itIan Jackson2022-04-251-12/+14
| | | | This same calculation was in the code three times.
* tor-error: Handle integer overflowsSamanta Navarro2022-04-231-4/+27
| | | | | | | If duration addition overflows, then continue with Never. Caching the AbsRetryTime constructed with duration from supplied function also reduces the overhead of earliest_absolute.
* RetryTime: Improve documentation.Nick Mathewson2022-04-041-7/+27
| | | | | | | | | For each case, describe its semantics (in addition to when you would create it). Explain the relationship between After and At. Stop saying "Strategy": we renamed this type to "RetryTime".
* RetryTime: make loose_cmp pub.Nick Mathewson2022-04-041-1/+1
|
* RetryTime: use strum::EnumDiscriminants to simplify loose_cmp.Nick Mathewson2022-04-041-26/+69
| | | | | Also add tests for RetryTime comparison functions to make sure they work as expected.
* tor-error: Add a new RetryTime type and related trait.Nick Mathewson2022-04-041-0/+217