mirror of https://github.com/astral-sh/uv
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
|
|
@ -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…
Reference in New Issue