diff options
author | syn <isaqtm@gmail.com> | 2020-12-08 10:37:04 +0300 |
---|---|---|
committer | syn <isaqtm@gmail.com> | 2020-12-08 10:37:04 +0300 |
commit | eaf9228f3a43c3654eeddbd10cfbaf172e4578f4 (patch) | |
tree | 6e24fe86e7ef4e580b559e41b77c113036248a68 /src/backends/mod.rs | |
parent | 420e77f90ba94cf9f8d3d0f7ae6395ba3ceda89f (diff) | |
download | evr-eaf9228f3a43c3654eeddbd10cfbaf172e4578f4.tar.gz |
cargo fmt
Diffstat (limited to 'src/backends/mod.rs')
-rw-r--r-- | src/backends/mod.rs | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/src/backends/mod.rs b/src/backends/mod.rs index 50bef36..6d402af 100644 --- a/src/backends/mod.rs +++ b/src/backends/mod.rs @@ -1,21 +1,20 @@ -use std::path::{ Path, PathBuf }; -use std::env::temp_dir; -use lazy_static::lazy_static; -use std::io::{ Error, ErrorKind }; use crate::wait::ChildExitStatus; +use lazy_static::lazy_static; +use std::env::temp_dir; +use std::io::{Error, ErrorKind}; +use std::path::{Path, PathBuf}; -pub mod python; pub mod clang; pub mod clang_c; +pub mod python; -pub use python::PythonBackend; pub use clang::ClangBackend; pub use clang_c::ClangCBackend; +pub use python::PythonBackend; pub mod run_error; pub use run_error::RunError; - lazy_static! { static ref EVR_TMP_DIR: PathBuf = temp_dir().join("evr-tmp"); } @@ -31,8 +30,10 @@ fn mk_tmp_dir() -> std::io::Result<&'static std::path::PathBuf> { std::fs::create_dir(&*EVR_TMP_DIR)?; } else { if !EVR_TMP_DIR.is_dir() { - return Err(Error::new(ErrorKind::AlreadyExists, - "tmp dir already exists and not a directory")) + return Err(Error::new( + ErrorKind::AlreadyExists, + "tmp dir already exists and not a directory", + )); } } Ok(&*EVR_TMP_DIR) |