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

Upgrade rand and replace tempdir (deprecated) with tempfile #374

Merged
merged 1 commit into from Jan 9, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion protoc-rust/Cargo.toml
Expand Up @@ -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"
4 changes: 2 additions & 2 deletions protoc-rust/src/lib.rs
@@ -1,4 +1,4 @@
extern crate tempdir;
extern crate tempfile;

extern crate protoc;
extern crate protobuf;
Expand Down Expand Up @@ -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");

Expand Down