Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

replace tempdir with tempfile, as tempdir is deprecated #77

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ serde = "1.0.0"
[dev-dependencies]
serde_derive = "1.0.0"
serde_json = "1.0.0"
tempdir = "0.3.4"
tempfile = "3.3.0"

[[test]]
name = "test"
Expand Down
4 changes: 2 additions & 2 deletions tests/template.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use std::cell::RefCell;
use tempdir::TempDir;
use tempfile::TempDir;
use std::fmt::Debug;
use std::fs::File;
use std::io::Write;
Expand Down Expand Up @@ -492,7 +492,7 @@ fn run_test(test: serde_json::Map<String, Json>, data: Data) {

// Make a temporary dir where we'll store our partials. This is to
// avoid a race on filenames.
let tmpdir = TempDir::new("").expect("Failed to make tempdir");
let tmpdir = TempDir::new().expect("Failed to make tempdir");

if let Some(value) = test.get("partials") {
write_partials(tmpdir.path(), value)
Expand Down
2 changes: 1 addition & 1 deletion tests/test.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
extern crate mustache;
extern crate serde;
extern crate serde_json;
extern crate tempdir;
extern crate tempfile;

#[macro_use] extern crate serde_derive;

Expand Down