aboutsummaryrefslogtreecommitdiff
path: root/crates/tor-hsservice/src/time_store.rs
Commit message (Collapse)AuthorAgeFilesLines
* tor-hsservice: Remove a useless formatIan Jackson2026-07-271-4/+4
| | | | Placates clippy.
* 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-hssrvice: port to web-time-compat.Nick Mathewson2026-03-261-3/+4
|
* Fix name of clippy lint to unchecked_time_subtraction (2)Ian Jackson2025-11-061-1/+1
| | | | Run maint/add_warning
* tor-hsservice: Fix time_store test.Wesley Aptekar-Cassels2025-10-011-1/+0
| | | | | | | | This behaviour was changed in humantime 2.3.0. Because they made this breaking change on a minor semver bump, if we want to depend on this behaviour, we would need to lock to a specific version. I don't think this is critical, but I am still looking into where exactly this is used.
* Switch Cargo.toml files to edition 2024.Nick Mathewson2025-08-071-3/+3
| | | | | | | | | | | | | | 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.
* tor-hsservice: Suppress false-positive clippy::useless_concat.Gabriela Moldovan2025-07-071-1/+4
|
* Upgrade to derive_more version 1.0.0Nick Mathewson2024-09-251-2/+2
| | | | | | 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.
* Change deftly syntax to post 0.12.1 versionIan Jackson2024-06-171-2/+2
| | | | | | | | | | | * Change `pub` to `export` * Change the `=` in define to `:` * Change `pub_template_semver_check` to `template_export_semver_check` Right now, 0.12.1 supports both syntaxes. I have verified this branch also compiles with https://gitlab.torproject.org/Diziet/rust-derive-deftly/-/merge_requests/402 ee171ffaf56d7dcb7d75584054921153fe19b222
* derive-deftly: Change some docs referencesIan Jackson2024-04-031-1/+1
| | | | Found by "git grep adhoc" and manual inspection.
* Switch to derive-deftlyIan Jackson2024-04-031-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is the combination of a number of separate commits, many of which were generated by seddery, and then rebased and squashed. Cargo.toml perl -i~ -pe 's{^derive-adhoc}{derive-deftly = "0.10"}' crates/*/Cargo.toml (not regenerated during rebase) update Cargo.lock `cargo fetch` without --locked (regenerated during rebase) seddery git-ls-files | grep '\.rs$' | xargs perl -i~ -pe 's{^use derive_adhoc}{use derive_deftly}' git-ls-files | grep '\.rs$' | xargs perl -i~ -pe 's{\bdefine_derive_adhoc\b}{define_derive_deftly}g' git-ls-files | grep '\.rs$' | xargs perl -i~ -pe 's{\bAdhoc\b}{Deftly}g if m{derive}' git-ls-files | grep '\.rs$' | xargs perl -i~ -pe 's{\#\[derive_adhoc\b}{#[derive_deftly}g' git-ls-files | grep '\.rs$' | xargs perl -i~ -pe 's{use derive_adhoc}{use derive_deftly}' git-ls-files | grep '\.rs$' | xargs perl -i~ -pe 's{\bderive_adhoc\b}{derive_deftly_adhoc} if m{use.*deftly}' git-ls-files | grep '\.rs$' | xargs perl -i~ -pe 's{\bderive_adhoc!}{derive_deftly_adhoc!}' (not regenerated during rebase) Manually add `#[derive_deftly_adhoc]` where needed. seddery git-ls-files | grep '\.rs$' | xargs perl -i~ -pe 's{\#\[adhoc\b}{#[deftly}g' git-ls-files | grep '\.rs$' | xargs perl -i~ -pe 's{\bderive_adhoc_template}{derive_deftly_template}' (not regenerated during rebase) Manually fix up an import Manually update some builder attrs Manually fix up tor_rtmock::time_core This was missed in my seddery, due to me rebasing the branch and not redoing the seddery.
* Run maint/add_warning.Nick Mathewson2024-03-131-0/+1
|
* tor-hsservice: IptLocalId: impl FromStrIan Jackson2023-12-071-2/+0
| | | | And implement serde that way, using SerdeStringOrTransparent.
* tor-hsservice: Expose SerdeStringOrTransparent to crateIan Jackson2023-12-071-1/+1
| | | | | And make it useable elsewhere by not expecting the particular error type.
* tor-hsservice: time_store: Change rel time Display to humantime (fmt)Ian Jackson2023-11-291-4/+1
|
* tor-hsservice: time_store: Change rel time Display to humantimeIan Jackson2023-11-291-31/+23
| | | | | Suggestion 3 from https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/1774#note_2970374
* tor-hsservice: time_store: Change rel time prefix to T+Ian Jackson2023-11-291-13/+13
| | | | | Suggestion 2 from https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/1774#note_2970374
* tor-hsservice: time_store: rustfmtIan Jackson2023-11-281-5/+6
| | | | Apply deferred churn.
* tor-hsservice: time_store: tests: Split up a stringIan Jackson2023-11-281-1/+4
|
* tor-hsservice: time_store: deser strings: don't allocateIan Jackson2023-11-281-5/+19
| | | | | | When is_human_readable, use a Visitor to offer the data format visit_str, which will often allow the data format to avoid consing an actual String.
* tor-hsservice: time_store: Reference: change serdeIan Jackson2023-11-281-11/+6
|
* tor-hsservice: time_store: Reference: impl FromStrIan Jackson2023-11-281-1/+22
|
* tor-hsservice: time_store: Reference: change DisplayIan Jackson2023-11-281-4/+8
|
* tor-hsservice: time_store: provide time_t_to_system_timeIan Jackson2023-11-281-0/+74
| | | | Being careful about overflow and avoiding panics is quite a palaver!
* tor-hsservice: time_store: break out system_time_to_time_tIan Jackson2023-11-281-7/+12
|
* tor-hsservice: time_store: SerdeStringOrTransparent macroIan Jackson2023-11-281-26/+41
| | | | We're going to want to do this for Reference too.
* tor-hsservice: time_store: FutureTimestamp: change serdeIan Jackson2023-11-281-8/+31
| | | | Use the string representation in binary formats.
* tor-hsservice: time_store: FutureTimestamp: impl FromStrIan Jackson2023-11-281-0/+45
| | | | | Parse the string representation too. We'll be using this for serde.
* tor-hsservice: time_store: FutureTimestamp: change DisplayIan Jackson2023-11-281-2/+27
|
* tor-hsservice: time_store: tests: Add an mpack testIan Jackson2023-11-281-0/+25
| | | | We're going to serialise different in binary formats.
* tor-hsservice: time_store: tests: use a fixed SystemTimeIan Jackson2023-11-281-5/+6
| | | | This will make them easier to adjust when we serialise differently.
* tor-hsservice: time_store: Add TODO HSS re serialisationsIan Jackson2023-11-021-0/+5
| | | | | | As per https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/1723#note_2960861 https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/1723#note_2961013
* tor-hsservice: time_store: Slight structural tidyingIan Jackson2023-11-021-3/+1
| | | | | | Prompted by https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/1723#note_2960877 and following some IRC discussion.
* HSS time_store: clarify by removing a commagabi-2502023-11-021-1/+1
|
* tor-hsservice: New time_store module (provide accessors)Ian Jackson2023-11-011-2/+43
| | | | These are the logically necessary accessors.
* tor-hsservice: New time_store moduleIan Jackson2023-11-011-0/+367
I found time handling in IPT persistence very confusing to think about, so I propose to deal with all of the hard questions in a module. Again we have a doctest so use the technique we used for having timeout_track not be semver-exposed.