Skip to content

Commit 1de9229

Browse files
committed
chore: address new #[must_use] warning on into_raw_fd
We explicitly use into_raw_fd to leak an already closed fd. Signed-off-by: Patrick Roy <[email protected]>
1 parent 73df97a commit 1de9229

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

kvm-ioctls/src/ioctls/vcpu.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2863,7 +2863,7 @@ mod tests {
28632863

28642864
// Don't drop the File object, or it'll notice the file it's trying to close is
28652865
// invalid and abort the process.
2866-
faulty_vcpu_fd.vcpu.into_raw_fd();
2866+
let _ = faulty_vcpu_fd.vcpu.into_raw_fd();
28672867
}
28682868

28692869
#[test]
@@ -2909,7 +2909,7 @@ mod tests {
29092909

29102910
// Don't drop the File object, or it'll notice the file it's trying to close is
29112911
// invalid and abort the process.
2912-
faulty_vcpu_fd.vcpu.into_raw_fd();
2912+
let _ = faulty_vcpu_fd.vcpu.into_raw_fd();
29132913
}
29142914

29152915
#[test]

0 commit comments

Comments
 (0)