| Commit message (Collapse) | Author | Age | Files | Lines |
| ... | |
| | |
| |
| |
| |
| |
| |
| | |
Introduce a Bug variant.
Then, use it for conversions from BadSlug. See the comment for why I
think this is appropriate.
|
| | |
| |
| |
| |
| |
| |
| |
| | |
You don't need to consume a Mistrust to get a CheckedDir - you use a
Verifier and then something clones it for you. So StateDirectory::new
should take &Mistrust.
And instance_peek_storage needs T to be deserialisable!
|
| | |
| |
| |
| |
| | |
This is rather more serious than many deletions - it wipes out the
whole directory. And this name goes better with purge_instances.
|
| | |
| |
| |
| | |
The formatting will be normalised roughly as we go.
|
| | |
| |
| |
| | |
Now we get log messages about what we're reading/writing.
|
| |/ |
|
| | |
|
| |
|
|
|
|
|
|
| |
This also removes a TODO regarding adding a `Nickname` type for
representing `HsClientSpecifier` and `HsNickname` (we don't need it if
`Slug`s are non-empty).
Prompted by https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/1931#note_2990227
|
| | |
|
| |
|
|
|
|
|
|
| |
The internal representation of `HsNickname` will soon be `Slug`,
and nicknames can contain hyphens, so let's add `-` to the allowed
charset.
Part of #1092
|
| | |
|
| |\
| |
| |
| |
| | |
TryIntoSlug
See merge request tpo/core/arti!1922
|
| | | |
|
| | |
| |
| |
| | |
And tidy up some of the docs to refer to the slug module.
|
| | | |
|
| | | |
|
| |\ \
| | |
| | |
| | |
| | | |
slug: Implement the AsRefs for Slug as well as for SlugRef
See merge request tpo/core/arti!1929
|
| | |/
| |
| |
| |
| | |
Otherwise you can't use &Slug where someone wants &impl AsRef<Path>,
which is rather sad.
|
| |/ |
|
| |
|
|
|
|
|
|
|
| |
Abolish it, sprinkling cfg all over, rather than having it be
uninhabited.
See
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/1912#note_2988746
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/1912#note_2988748
|
| |
|
|
|
|
|
|
|
| |
I need this for state_dir (#1163, !1853).
I intend that this should be used for arti paths (#1092, #1193).
See also #1195.
Implements the spec in #1192 but doesn't connect it to anything yet.
|
| | |
|
| | |
|
| |
|
|
|
| |
You can't call these yet and there aren't any tests. But this
demonstrates use of the previous refactoring.
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Before this, we would say the problem happened while accessing
Resource::File {
container: "STATE_DIR",
file: "KEY.json",
}
which would imply that we failed to access "STATE_DIR/KEY.json".
But that's not true: we *actually* access "STATE_DIR/state/KEY.json".
|
| |
|
|
|
| |
Bring in the fslock-guard crate and replace the Void in the structs.
(Separated out since this contains Cargo.lock churn.)
|
| |
|
|
|
|
|
|
|
|
| |
And, instead of being a hidden module, it's a public experimental one.
I have feature-gated all the new dependencies since we probably want
to feature-gate this module in perpetuity, since some builds of Arti
won't need it.
Closes #1205
|
| |
|
|
| |
Closes #1215
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
This code needs fs_mistrust::Error and tor_error::ErrorKind. I think
we probably don't want fs_mistrust to depend on tor_error or vice
versa.
tor_persist is approximately the place where these two threads of
thought come together, and it's currently the lowest place where this
is needed.
Use it in tor-dirmgr too, which is currently the other place that
embodies this knowledge about fs_mistrust::Error.
|
| |
|
|
|
| |
I see other problems with this API, see #1136. but we can at least
easily do this.
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
| |
Closes #950.
|
| | |
|
| |\
| |
| |
| |
| |
| |
| | |
Create and use an ErrorHint type to report how to fix a problem.
Closes #579 and #578
See merge request tpo/core/arti!994
|
| | | |
|
| | |
| |
| |
| | |
Split off for ease of review and possible rebase.
|
| |/ |
|
| |
|
|
|
| |
This panics on error, and we're fine with a panic on misbehavior in
tests.
|
| |
|
|
|
|
|
|
| |
This warning kind of snuck up on us! (See #748) For now, let's
disable it. (I've cleaned it up in a couple of examples, since
those are meant to be more idiomatic and user-facing.)
Closes #748.
|
| |
|
|
|
| |
This is precisely the result of running the rune in
maint/adhoc-add-lint-blocks.
|
| | |
|
| |
|
|
|
| |
It looks like, despite a few false starts, they've got this warning
right; there weren't any false positives.
|
| |
|
|
| |
It was introduced in Rust 1.57.
|