Skip to content

Commit b720ee6

Browse files
committed
Work around dead_code warning in flock implementation
warning: field `0` is never read --> src/flock.rs:22:12 | 22 | Locked(MutexGuard<'static, ()>), | ------ ^^^^^^^^^^^^^^^^^^^^^^^ | | | field in this variant | = note: `#[warn(dead_code)]` on by default help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field | 22 | Locked(()), | ~~
1 parent 0081291 commit b720ee6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/flock.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ pub struct Lock {
1919
// integration test crate.
2020
enum Guard {
2121
NotLocked,
22-
Locked(MutexGuard<'static, ()>),
22+
Locked(#[allow(dead_code)] MutexGuard<'static, ()>),
2323
}
2424

2525
// Best-effort filesystem lock to coordinate different #[test] functions across

0 commit comments

Comments
 (0)