Skip to content

Commit

Permalink
Upgrade rand to 0.5 and replace tempdir (deprecated) with tempfile
Browse files Browse the repository at this point in the history
  • Loading branch information
mehcode authored and stepancheg committed Jan 9, 2019
1 parent 1bb4eed commit 8ab240b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
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

0 comments on commit 8ab240b

Please sign in to comment.