impl Deref for Configuration
This commit is contained in:
parent
a36c213cec
commit
86929c819c
1 changed files with 10 additions and 0 deletions
|
@ -1,5 +1,6 @@
|
|||
use std::path::PathBuf;
|
||||
use std::result::Result as RResult;
|
||||
use std::ops::Deref;
|
||||
|
||||
use toml::{Parser, Value};
|
||||
|
||||
|
@ -169,6 +170,15 @@ impl Configuration {
|
|||
|
||||
}
|
||||
|
||||
impl Deref for Configuration {
|
||||
type Target = Value;
|
||||
|
||||
fn deref(&self) -> &Value {
|
||||
&self.config
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
fn get_verbosity(v: &Value) -> bool {
|
||||
match v {
|
||||
&Value::Table(ref t) => t.get("verbose")
|
||||
|
|
Loading…
Reference in a new issue