From 60528e3e253d9c3d14dc129df68030a0a407c50d Mon Sep 17 00:00:00 2001 From: Jack O'Connor Date: Fri, 20 Jun 2025 16:00:13 -0700 Subject: [PATCH] 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. --- crates/uv-fs/src/lib.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/crates/uv-fs/src/lib.rs b/crates/uv-fs/src/lib.rs index ad4a883ad..dcc0f00b2 100644 --- a/crates/uv-fs/src/lib.rs +++ b/crates/uv-fs/src/lib.rs @@ -601,6 +601,7 @@ pub fn is_virtualenv_base(path: impl AsRef) -> bool { /// A file lock that is automatically released when dropped. #[derive(Debug)] +#[must_use] pub struct LockedFile(fs_err::File); impl LockedFile {