Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
Signed-off-by: John Nunley <[email protected]>
  • Loading branch information
notgull committed Aug 16, 2023
1 parent 95a7bca commit 69cdbe8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/iocp/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -929,7 +929,7 @@ impl PacketUnwrapped {
// The poller was notified.
return Ok(FeedEventResult::Notified);
}
PacketInnerProj::Waitable { handle } => {
PacketInnerProj::Waitable { handle } => {
let mut handle = lock!(handle.lock());
let event = handle.interest;

Expand Down
8 changes: 5 additions & 3 deletions tests/windows_overlapped.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ fn win32_file_io() {
let file_handle = unsafe {
let raw_handle = wfs::CreateFileW(
fname.as_ptr(),
wf::GENERIC_WRITE,
wf::GENERIC_WRITE | wf::GENERIC_READ,
0,
std::ptr::null_mut(),
wfs::CREATE_ALWAYS,
Expand Down Expand Up @@ -65,7 +65,7 @@ fn win32_file_io() {
let mut len = input_text.len();
while len > 0 {
// Begin the write.
let ptr = write_packet.as_ptr() as *mut _;
let ptr = write_packet.as_ptr() as *mut _;
unsafe {
if wfs::WriteFile(
file_handle.as_raw_handle() as _,
Expand All @@ -83,7 +83,9 @@ fn win32_file_io() {
// Wait for the overlapped operation to complete.
'waiter: loop {
events.clear();
println!("Starting wait...");
poller.wait(&mut events, None).unwrap();
println!("Got events");

for event in events.iter() {
if event.writable && event.key == 2 {
Expand All @@ -102,7 +104,7 @@ fn win32_file_io() {
let file_handle = unsafe {
let raw_handle = wfs::CreateFileW(
fname.as_ptr(),
wf::GENERIC_READ,
wf::GENERIC_READ | wf::GENERIC_WRITE,
0,
std::ptr::null_mut(),
wfs::OPEN_EXISTING,
Expand Down

0 comments on commit 69cdbe8

Please sign in to comment.