summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/backends/mod.rs7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/backends/mod.rs b/src/backends/mod.rs
index 82ec6a7..b91bde5 100644
--- a/src/backends/mod.rs
+++ b/src/backends/mod.rs
@@ -1,6 +1,7 @@
use std::path::{ Path, PathBuf };
use std::env::temp_dir;
use lazy_static::lazy_static;
+use std::io::{ Error, ErrorKind, Result };
pub mod python;
pub mod clang;
@@ -15,7 +16,7 @@ lazy_static! {
pub trait Backend {
fn get_template(&self) -> Option<&str>;
- fn run(&self, fname: &Path) -> std::io::Result<()>;
+ fn run(&self, fname: &Path) -> Result<()>;
fn try_guess_test_file(&self, fname: &Path) -> Option<PathBuf> {
let maybe_test = fname.with_extension("txt");
@@ -26,12 +27,12 @@ pub trait Backend {
}
}
-fn mk_tmp_dir() -> std::io::Result<&'static std::path::PathBuf> {
+fn mk_tmp_dir() -> Result<&'static std::path::PathBuf> {
if !EVR_TMP_DIR.exists() {
std::fs::create_dir(&*EVR_TMP_DIR)?;
} else {
if !EVR_TMP_DIR.is_dir() {
- return Err(std::io::Error::new(std::io::ErrorKind::AlreadyExists,
+ return Err(Error::new(ErrorKind::AlreadyExists,
"tmp dir already exists and not a directory"))
}
}