replaced tempdir with tempfile (#938)

This commit is contained in:
Artyom Pavlov 2018-03-27 15:05:48 +03:00 committed by Pierre Krieger
parent 5e73ce96a1
commit 570203945c
2 changed files with 3 additions and 3 deletions

View File

@ -9,7 +9,7 @@ build = "build/build.rs"
categories = ["rendering::graphics-api"]
[dependencies]
tempdir = "0.3.5"
tempfile = "3"
[build-dependencies]
cmake = "0.1.27"

View File

@ -7,7 +7,7 @@
// notice may not be copied, modified, or distributed except
// according to those terms.
extern crate tempdir;
extern crate tempfile;
use std::fs::File;
use std::io::Write;
@ -24,7 +24,7 @@ pub fn compile(code: &str, ty: ShaderType) -> Result<SpirvOutput, String> {
fn compile_inner<'a, I>(shaders: I) -> Result<SpirvOutput, String>
where I: IntoIterator<Item = (&'a str, ShaderType)>
{
let temp_dir = tempdir::TempDir::new("glslang-compile").unwrap();
let temp_dir = tempfile::tempdir().unwrap();
let output_file = temp_dir.path().join("compilation_output.spv");
let mut command = Command::new(concat!(env!("OUT_DIR"), "/glslang_validator"));