summaryrefslogtreecommitdiffstats
path: root/src/conf.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/conf.rs')
-rw-r--r--src/conf.rs19
1 files changed, 2 insertions, 17 deletions
diff --git a/src/conf.rs b/src/conf.rs
index 8aeb8e3..26a4832 100644
--- a/src/conf.rs
+++ b/src/conf.rs
@@ -1,7 +1,6 @@
use serde_derive::Deserialize;
use std::path::{ PathBuf, Path };
use toml::de;
-use log::{ error };
type Error = std::io::Error;
use std::io::ErrorKind;
@@ -9,7 +8,7 @@ use std::io::ErrorKind;
use crate::backends::{ Backend, PythonBackend, ClangBackend };
-#[derive(Debug, Deserialize, Default)]
+#[derive(Debug, Deserialize)]
pub struct Conf {
#[serde(skip)]
path: Option<PathBuf>,
@@ -43,21 +42,7 @@ impl Conf {
}
-pub fn get_conf() -> Conf {
- match get_conf_maybe() {
- Ok(c) => c,
- Err(e) => {
- match e.kind() {
- ErrorKind::InvalidData => error!("parse: {}", e),
- _ => error!("{}", e)
- };
- Default::default()
- }
- }
-}
-
-
-pub fn get_conf_maybe() -> Result<Conf, Error> {
+pub fn get_conf() -> Result<Conf, Error> {
let mut current = std::env::current_dir()?;
let path = loop {
let candidate = current.join(".evr");