Skip to content

Commit

Permalink
📝 use tempfile instead of tempdir
Browse files Browse the repository at this point in the history
  • Loading branch information
Xudong-Huang committed Sep 4, 2024
1 parent a766330 commit d75d391
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ features = [
bytes = "1.0"
serde = "1.0"
docopt = "1.0"
tempdir = "0.3"
httparse = "1.1"
tempfile = "3"
native-tls = "0.2"
tungstenite = "0.24"
serde_derive = "1.0"
Expand Down
5 changes: 2 additions & 3 deletions src/os/unix/net.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1091,12 +1091,11 @@ impl io_impl::AsIoData for UnixDatagram {
#[cfg(all(test, not(target_os = "emscripten")))]
mod test {
use std::io::prelude::*;
use tempdir::TempDir;

use super::*;

fn tmpdir() -> TempDir {
TempDir::new("test").expect("failed to create TempDir")
fn tmpdir() -> tempfile::TempDir {
tempfile::tempdir().expect("failed to create TempDir")
}

macro_rules! or_panic {
Expand Down

0 comments on commit d75d391

Please sign in to comment.