| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
We need these because `File::lock()` and `File::try_lock()`
claim not to work on Android, and have to be emulated with flock.
For more information, see
<https://github.com/rust-lang/rust/issues/148325>.
Closes #2544.
Based on code by @syphyr.
Co-Authored-By: syphyr <[email protected]>
|
| |
|
|
| |
We're about to provide android-only versions of these.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Unlike winapi, windows-sys is maintained (by microsoft),
and supports more APIs. We use it elsewhere in our tree,
but this was our largest usae of winapi.
The GetFileInformationByHandleEx variant includes an
explicit buffer size to make errors harder,
and enables us to get a 128-bit file identifier,
which is (supposedly) even more unique than the 64-bit
identifiers we were looking at before.
|
| |
|
|
|
| |
This mainly amounts to clarifying some of our windows desiderata,
and removing the final refrences to fslock.
|
| |
|
|
|
|
| |
We can't actually open a file on wasm-unknown-unknown,
but it's more convenient for us if we don't have to conditionally
compile this crate every place that uses it.
|
| |
|
|
|
| |
We can do this since our msrv is now 1.89.0, where
File::lock is supported.
|
| |
|
|
|
|
|
|
|
| |
`clippy::collapsible_if` started triggering after bumping the MSRV to
1.88.
Since this triggers from a lot of places, and since there even are a
couple of instances where we explicitly allow `clippy::collapsible_ifs`,
I've opened #2342 for deciding what to do about it.
|
| |
|
|
| |
This adds the lint to all our crates.
|
| |
|
|
| |
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.
|
| |
|
|
| |
See #2060.
|
| |
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
| |
Denies 'mod.rs' files for consistency.
https://rust-lang.github.io/rust-clippy/master/index.html#mod_module_files
|
| |
|
|
|
|
|
|
| |
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 is automatically generated.
|
| | |
|
| |\
| |
| |
| |
| | |
fslock-guard: Add unit tests
See merge request tpo/core/arti!2013
|
| | |
| |
| |
| |
| | |
This requires reordering of workspace members due to new internal
dev-dependency.
|
| |\ \
| | |
| | |
| | |
| | | |
Fix Windows documentation
See merge request tpo/core/arti!2011
|
| | |/
| |
| |
| |
| | |
The implementation changed in bd52d43779ed3a61d000bf16e96ed09ad924e141
but comments have not been updated.
|
| |\ \
| | |
| | |
| | |
| | |
| | |
| | | |
deny clippy::unchecked_duration_subtraction
Closes #1304
See merge request tpo/core/arti!2008
|
| | |/ |
|
| |/
|
|
|
| |
Cast argument to GetFileInformationByHandle, because types do not match.
Output is: expected `winapi::ctypes::c_void`, found `std::ffi::c_void`
|
| | |
|
| | |
|
| |
|
|
|
| |
These are necessarily a bit hand-wavey, but I think they summarize
what we are assuming.
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
| |
Text from here
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/1900#note_2986683
with a few minor fixes.
|
| |
|
|
|
|
|
|
|
|
|
| |
These two modules are key to the implementation of the locking
protocols.
We must define the locking protocol in terms of underlying OS
semantics (since Unix and Windows have different fs concepts and
different concurrency semantics) and therefore, although we are
sharing some code between the implementations, these modules are what
defines the two protocols.
|
| | |
|
|
|
This is not yet "correct", since it will rely on
https://github.com/brunoczim/fslock/pull/15
(Conceivably, it might be better to make the `fslock` crate rm-safe.)
|