Skip to content

Commit 29bed98

Browse files
youknowoneclaude
andcommitted
Fix clippy warnings in overlapped module
- Add #[allow(dead_code)] to specific OverlappedData variants that store buffers which must be kept alive during async operations but aren't directly read from Rust code: ReadInto, Write, Accept - Add #[allow(dead_code)] to WaitNamedPipeAndConnect (reserved for named pipe) - Add #[allow(clippy::too_many_arguments)] to TransmitFile method which follows CPython's API signature Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 1b26efc commit 29bed98

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

crates/stdlib/src/overlapped.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,12 +158,17 @@ mod _overlapped {
158158
None,
159159
NotStarted,
160160
Read(PyBytesRef),
161+
// Fields below store buffers that must be kept alive during async operations
162+
#[allow(dead_code)]
161163
ReadInto(PyBuffer),
164+
#[allow(dead_code)]
162165
Write(PyBuffer),
166+
#[allow(dead_code)]
163167
Accept(PyBytesRef),
164168
Connect(Vec<u8>), // Store address bytes to keep them alive during async operation
165169
Disconnect,
166170
ConnectNamedPipe,
171+
#[allow(dead_code)] // Reserved for named pipe support
167172
WaitNamedPipeAndConnect,
168173
TransmitFile,
169174
ReadFrom(OverlappedReadFrom),
@@ -1055,6 +1060,7 @@ mod _overlapped {
10551060
}
10561061

10571062
// TransmitFile
1063+
#[allow(clippy::too_many_arguments)]
10581064
#[pymethod]
10591065
fn TransmitFile(
10601066
zelf: &Py<Self>,

0 commit comments

Comments
 (0)