Skip to content
This repository was archived by the owner on Jun 8, 2021. It is now read-only.

Commit 96493f1

Browse files
Merge pull request #427 from EPashkin/use_tempfile
Replace deprecated tempdir crate
2 parents ee61c14 + 68a0364 commit 96493f1

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,15 @@ travis-ci = { repository = "gtk-rs/glib" }
2121
name = "glib"
2222

2323
[dependencies]
24-
lazy_static = "1.0"
24+
lazy_static = "1.2"
2525
libc = "0.2"
2626
bitflags = "1.0"
2727
futures-preview = { version = "0.2", optional = true }
2828
glib-sys = { git = "https://github.com/gtk-rs/sys" }
2929
gobject-sys = { git = "https://github.com/gtk-rs/sys" }
3030

3131
[dev-dependencies]
32-
tempdir = "0.3"
32+
tempfile = "3"
3333

3434
[features]
3535
v2_34 = ["glib-sys/v2_34", "gobject-sys/v2_34"]

src/translate.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1736,8 +1736,8 @@ impl FromGlibPtrContainer<*const c_char, *mut glib_ffi::GHashTable> for HashMap<
17361736

17371737
#[cfg(test)]
17381738
mod tests {
1739-
extern crate tempdir;
1740-
use self::tempdir::TempDir;
1739+
extern crate tempfile;
1740+
use self::tempfile::tempdir;
17411741
use std::fs;
17421742

17431743
use std::collections::HashMap;
@@ -1783,7 +1783,7 @@ mod tests {
17831783
#[test]
17841784
#[cfg(not(target_os = "macos"))]
17851785
fn test_paths() {
1786-
let tmp_dir = TempDir::new("glib-test").unwrap();
1786+
let tmp_dir = tempdir().unwrap();
17871787

17881788
// Test if passing paths to GLib and getting them back
17891789
// gives us useful results
@@ -1808,7 +1808,7 @@ mod tests {
18081808
#[test]
18091809
#[cfg(target_os = "macos")]
18101810
fn test_paths() {
1811-
let t_dir = TempDir::new("glib-test").unwrap();
1811+
let t_dir = tempdir().unwrap();
18121812
let tmp_dir = t_dir.path().canonicalize().unwrap();
18131813

18141814
// Test if passing paths to GLib and getting them back

0 commit comments

Comments
 (0)