mirror of
https://github.com/astral-sh/uv.git
synced 2025-07-07 13:25:00 +00:00
Annotate LockedFile with #[must_use]
Standard lock guards have the same annotation, because creating them without binding them to a local variable is almost always a mistake.
This commit is contained in:
parent
1ff8fc0947
commit
60528e3e25
1 changed files with 1 additions and 0 deletions
|
@ -601,6 +601,7 @@ pub fn is_virtualenv_base(path: impl AsRef<Path>) -> bool {
|
|||
|
||||
/// A file lock that is automatically released when dropped.
|
||||
#[derive(Debug)]
|
||||
#[must_use]
|
||||
pub struct LockedFile(fs_err::File);
|
||||
|
||||
impl LockedFile {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue