From 570203945cc05af51f3de8419774ee239d1a1787 Mon Sep 17 00:00:00 2001 From: Artyom Pavlov Date: Tue, 27 Mar 2018 15:05:48 +0300 Subject: [PATCH] replaced tempdir with tempfile (#938) --- glsl-to-spirv/Cargo.toml | 2 +- glsl-to-spirv/src/lib.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/glsl-to-spirv/Cargo.toml b/glsl-to-spirv/Cargo.toml index 65c9fba2..3ad3d338 100644 --- a/glsl-to-spirv/Cargo.toml +++ b/glsl-to-spirv/Cargo.toml @@ -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" diff --git a/glsl-to-spirv/src/lib.rs b/glsl-to-spirv/src/lib.rs index 09f6794c..93acd325 100644 --- a/glsl-to-spirv/src/lib.rs +++ b/glsl-to-spirv/src/lib.rs @@ -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 { fn compile_inner<'a, I>(shaders: I) -> Result where I: IntoIterator { - 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"));