Skip to content

Commit ef3435d

Browse files
committed
Fix windows clippy lints
1 parent 2cad340 commit ef3435d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

crates/tmc-langs-util/src/file_util/lock_windows.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ impl FileLock {
4747
let lock = self.lock.as_mut().expect("set to Some before this call");
4848
let guard = lock.write().expect("cannot fail on Windows");
4949
Ok(FileLockGuard {
50-
_guard: LockInner::RwLockWriteGuard(guard),
50+
_guard: LockInner::RwLockWriteGuard { _guard: guard },
5151
path: Cow::Borrowed(&self.path),
5252
})
5353
} else if self.path.is_dir() {
@@ -72,7 +72,7 @@ impl FileLock {
7272
Ok(file) => {
7373
// was able to create a new lock file
7474
return Ok(FileLockGuard {
75-
_guard: LockInner::LockFile(file),
75+
_guard: LockInner::LockFile { _file: file },
7676
path: Cow::Owned(lock_path),
7777
});
7878
}
@@ -122,8 +122,8 @@ pub struct FileLockGuard<'a> {
122122
}
123123

124124
enum LockInner<'a> {
125-
LockFile(File),
126-
RwLockWriteGuard(RwLockWriteGuard<'a, File>),
125+
LockFile { _file: File },
126+
RwLockWriteGuard { _guard: RwLockWriteGuard<'a, File> },
127127
}
128128

129129
impl Drop for FileLockGuard<'_> {

0 commit comments

Comments
 (0)