summaryrefslogtreecommitdiff
path: root/crates/tor-config/src/flatten.rs
Commit message (Collapse)AuthorAgeFilesLines
* tor-config: Flattenable: use beta_deftly $impl featureIan Jackson2026-06-111-3/+2
|
* 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-config: Make derive(Flattenable) use $crate.Nick Mathewson2025-12-091-4/+3
|
* tor-config: Give Flattenable template a location.Nick Mathewson2025-12-091-0/+1
| | | | | | If we don't do this, then any attempt to use it from a derive-deftly template will cause a warning about referring to it as $crate::macroname.
* tor-config: Allow Flattenable to apply to types with generics.Nick Mathewson2025-12-091-1/+2
|
* Fix name of clippy lint to unchecked_time_subtraction (2)Ian Jackson2025-11-061-1/+1
| | | | Run maint/add_warning
* Switch Cargo.toml files to edition 2024.Nick Mathewson2025-08-071-1/+1
| | | | | | | | | | | | | | 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.
* Change deftly syntax to post 0.12.1 versionIan Jackson2024-06-171-1/+1
| | | | | | | | | | | * 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
* doc: Use locked buildpinkforest2024-05-161-1/+1
|
* derive-deftly: Change some docs referencesIan Jackson2024-04-031-4/+4
| | | | Found by "git grep adhoc" and manual inspection.
* Switch to derive-deftlyIan Jackson2024-04-031-27/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
|
* Fix typosDimitris Apostolou2024-01-081-1/+1
|
* tor-config: use black_box in test.Nick Mathewson2023-11-301-3/+1
|
* tor-config: derive Default for FlattenNick Mathewson2023-10-031-1/+1
|
* tor-config: flatten: Remove a redundant allowIan Jackson2023-09-201-1/+0
| | | | At some earlier point of development this struct was pub.
* tor-config: flatten: Sort out names for field extractorIan Jackson2023-09-201-12/+12
|
* tor-config: flatten: always use field list from serdeIan Jackson2023-09-201-47/+16
| | | | | | | | This is a better trickery! Now we don't need to derive the list of field names at all. The test case becomes much simpler too, and no longer needs to compare field lists since we have only the serde field list.
* tor-config: flatten: Performance of flattenable_extract_fieldsIan Jackson2023-09-201-0/+31
| | | | | Add a performance note, and the manually-verified test case to support it.
* tor-config: flatten: Break out flattenable_extract_fieldsIan Jackson2023-09-201-24/+40
| | | | | | | | | This involves returning the field list in the `FlattenableTesterSuccess`. This leaves the names a little off; we'll update those at the end. Export this - it's going to replace the hidden pub test function.
* tor-config: flatten: Introduce FieldList type aliasIan Jackson2023-09-201-6/+9
| | | | We're going to use this some more, even.
* tor_config: flatten: Abolish FlattenErrorIan Jackson2023-09-201-38/+9
|
* tor_config: flatten tests: Remove the obsolete todoIan Jackson2023-09-201-1/+0
|
* tor_config: Add a note about FlattenErrorIan Jackson2023-09-201-0/+8
| | | | | Prompted by https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/1605#note_2945202
* tor_config: Flatten: Explain why the inner ref Flatten for serIan Jackson2023-09-201-0/+5
|
* tor_config: Flatten: Add missing tst annotationIan Jackson2023-09-201-0/+1
|
* tor_config: Provide FlattenIan Jackson2023-09-201-0/+680
This is an attempt to deal with the fact that `#[serde(flatten)]` is weirdly broken and doesn't work with `serde_ignored`.