diff --git a/protoc-rust/Cargo.toml b/protoc-rust/Cargo.toml index d83a1ab3f..9f524cd58 100644 --- a/protoc-rust/Cargo.toml +++ b/protoc-rust/Cargo.toml @@ -17,4 +17,4 @@ bench = false protoc = { path = "../protoc", version = "=2.2.2" } protobuf = { path = "../protobuf", version = "=2.2.2" } protobuf-codegen = { path = "../protobuf-codegen", version = "=2.2.2" } -tempdir = "~0.3" +tempfile = "3" diff --git a/protoc-rust/src/lib.rs b/protoc-rust/src/lib.rs index 1118e2ad7..e576851c1 100644 --- a/protoc-rust/src/lib.rs +++ b/protoc-rust/src/lib.rs @@ -1,4 +1,4 @@ -extern crate tempdir; +extern crate tempfile; extern crate protoc; extern crate protobuf; @@ -35,7 +35,7 @@ pub fn run(args: Args) -> Result<()> { let protoc = protoc::Protoc::from_env_path(); protoc.check()?; - let temp_dir = tempdir::TempDir::new("protoc-rust")?; + let temp_dir = tempfile::Builder::new().prefix("protoc-rust").tempdir()?; let temp_file = temp_dir.path().join("descriptor.pbbin"); let temp_file = temp_file.to_str().expect("utf-8 file name");