Skip to content

Commit

Permalink
Reduce required WinAPI version
Browse files Browse the repository at this point in the history
  • Loading branch information
Kestrer committed Mar 22, 2021
1 parent f82615c commit 8b44825
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ targets = ["aarch64-pc-windows-msvc", "i686-pc-windows-msvc", "x86_64-pc-windows
[dependencies]

[dependencies.winapi]
version = "0.3.9"
version = "0.3.3"
features = [
"std",
"fileapi",
Expand Down
1 change: 0 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
#![allow(bad_style)]
#![doc(html_root_url = "https://docs.rs/miow/0.3/x86_64-pc-windows-msvc/")]

extern crate socket2;
extern crate winapi;

#[cfg(test)]
Expand Down
8 changes: 6 additions & 2 deletions src/pipe.rs
Original file line number Diff line number Diff line change
Expand Up @@ -569,14 +569,18 @@ mod tests {
use std::thread;
use std::time::Duration;

use rand::{thread_rng, Rng};
use rand::{distributions::Alphanumeric, thread_rng, Rng};

use super::{anonymous, NamedPipe, NamedPipeBuilder};
use crate::iocp::CompletionPort;
use crate::Overlapped;

fn name() -> String {
let name = thread_rng().gen_ascii_chars().take(30).collect::<String>();
let name = thread_rng()
.sample_iter(Alphanumeric)
.take(30)
.map(char::from)
.collect::<String>();
format!(r"\\.\pipe\{}", name)
}

Expand Down

0 comments on commit 8b44825

Please sign in to comment.