httppeer: simplify two-way stream cleanup
No need to conditionalize the cleanup if the filename is assigned outside the
exception handler. I suppose `fd` leaks if `os.fdopen()` fails, but that was
the case before too (and may trigger another exception in the `finally` block on
Windows, when the file is still open).
rustfmt: update expected Rust edition
In this case it doesn't change anything, but we've been using 2021 for a
while now.
hghave: update expected rustfmt version
We still use nightly, but have moved to a newer nightly after the last
CI image upgrade in
74f1bf147a6d and
3876d4c6c79e.
rustfmt: apply formatting expected by newer nightly version
This was missed in
3876d4c6c79ec5c71e8c51b876cc157e93a5eaac somehow.
tests: stop skipping `mercurial/pure/osutil.py` during pytype runs
Not sure when the original issue(s) were fixed, but it works for me now.
largefiles: avoid a potentially undefined variable in exception case
The `wlock` variable is used to release the lock in the `finally` block, so it
would be undefined if `repo.wlock()` itself failed. Caught by pytype 2024.04.11
with py3.10.11.