| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
| |
This adds the lint to all our crates.
|
| |
|
|
|
|
|
|
|
|
|
| |
This will help a lot when people try to create files with names like
`""` and `" "` and `"foo "` and `"foo! Unless"`. It won't help as much
with files that have names like
`"filename\". To solve this problem, run install-trojan-now ; \""`.
Fortunately, we don't let adversaries choose filenames.
Closes #2266.
|
| |
|
|
|
|
|
|
|
| |
This makes fs-mistrust consistent with stat() and mkdir() and
friends, which consider "" to be an invalid path. Previously, ""
was accepted whenever mistrust was enabled, but rejected
whenever mistrust was disabled.
Closes #2265.
|
| |
|
|
| |
Run maint/add_warning
|
| |
|
|
| |
This feature has been removed from nightly, in favor of doc_cfg.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
1. Run cargo fix --edition
2. Selectively revert the "if let"->"match" changes.
These changes are meant to protect us from the lifetime changes
for "if let" bindings in Rust 2024.
But we're not actually relying on the old lifetime rules
anywhere, and the match syntax here is quite ugly.
3. Automatically revert `$pat:expr_2021` to `$pat:expr`.
(We don't actually want to restrict the expression syntax
that our macros accept).
Done with
`git grep -l expr_2021 | xargs perl -i -pe 's/expr_2021/expr/g;'`
4. Run cargo fmt.
|
| |
|
|
|
| |
Use unix-specific crates only if needed and suppress clippy warnings of
unused variables if their usage is unix-specific.
|
| |
|
|
| |
See #2060.
|
| |
|
|
|
|
| |
- Replaced `once_cell::sync::Lazy` with `std::sync::LazyLock`.
Signed-off-by: hashcatHitman <[email protected]>
|
| |
|
|
|
|
|
| |
The `IoError::other` function is an easier way to say
`IoError::new(IoErrorKind::Other, ...)`. It's been around since
1.74, but clippy started warning about the more verbose version in
1.87.
|
| |
|
|
|
|
| |
The TrustAdminOnly enum value is only defined for unix systems.
Consider this fact in mistrust_build function to fix build on
e.g. Windows systems.
|
| |\
| |
| |
| |
| | |
fix builds for Android
See merge request tpo/core/arti!2824
|
| | |
| |
| |
| |
| |
| |
| | |
This does fix builds for both the arti binary and the tests. Most tests
seem to be passing, some are failing. I will try to investigate them and
send fixes/create issue to highlight them. Hopefully this helps arti in
being production ready fast.
|
| |/ |
|
| | |
|
| |
|
|
|
| |
Since it makes an exception, we need to be clear about the
exceptions that it _doesn't_ make.
|
| |
|
|
|
|
| |
Since "obeying the constraints of a FileAccess" is a term of art,
this commit introduces links from the places where it is used
to the place where it is defined.
|
| |
|
|
|
|
|
|
|
| |
`std::os::unix::fs::MetadataExt` was indeed the right trait to
import, but it doesn't exist on non-unix platforms.
This is another bugfix on !2707. It should retain the fix of !2717.
I've confirmed that it builds on Windows and passes tests on Linux
and Mac.
|
| | |
|
| |
|
|
|
| |
This approach makes it even less likely for people to store a
FileAccess for repeated use.
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
| |
When we're not bound to a CheckedDir, it doesn't make sense to
forbid following symlinks, so long as their targets are also
sensible.
|
| | |
|
| |
|
|
| |
There is no reason for these to consume self.
|
| | |
|
| | |
|
| |
|
|
|
| |
These are the methods which we'd like to give new options in #1746;
we can move other methods later if we want to.
|
| |
|
|
|
| |
We're going to move functionality and configuration functions here
to implement #1746.
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
| |
Denies 'mod.rs' files for consistency.
https://rust-lang.github.io/rust-clippy/master/index.html#mod_module_files
|
| | |
|
| |
|
|
|
|
|
|
| |
Since these environment variables become part of the stable API for
applications that use fs-mistrust, we should be explicit about how these
environment variables are interpreted so that applications can show the
values in their documentation or help text, and so that we don't
accidentally change the behaviour and break applications.
|
| | |
|
| |
|
|
| |
These are new in Rust 1.83.
|
| |
|
|
|
|
|
|
| |
In 1.83, this warning triggers on many of our crates.
We're thinking of fixing them all, but for now,
we're going to disable the warning.
This is part of #1765.
|
| |
|
|
|
|
| |
This commit removes an outdated syntax in a `thiserror` macro which will
be removed in `thiserror` version 2. The change this commit makes is
backwards compatible in itself.
|
| | |
|
| |
|
|
|
|
|
|
|
| |
Nightly rustdoc, under some circumstances, issues a warning when
you have an elided lifetime that matches a lifetime with a name.
(It would prefer that you name the lifetime explicitly.)
This does not change the actual lifetime of anything;
it only makes some formerly elided lifetimes explicit.
|
| |
|
|
| |
Otherwise it doesn't compile when actually used.
|
| |
|
|
| |
Placates clippy.
|
| | |
|
| | |
|
| |
|
|
| |
Prompted by https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/2291#note_3057232
|
| | |
|
| | |
|