Impl Into<Table> for EntryHeader
This commit is contained in:
parent
df9313c599
commit
794e7617e3
1 changed files with 12 additions and 0 deletions
|
@ -7,6 +7,7 @@ use std::sync::Arc;
|
|||
use std::sync::RwLock;
|
||||
use std::collections::BTreeMap;
|
||||
use std::io::{Seek, SeekFrom};
|
||||
use std::convert::Into;
|
||||
|
||||
use toml::{Table, Value};
|
||||
use regex::Regex;
|
||||
|
@ -733,6 +734,17 @@ impl EntryHeader {
|
|||
|
||||
}
|
||||
|
||||
impl Into<Table> for EntryHeader {
|
||||
|
||||
fn into(self) -> Table {
|
||||
match self.header {
|
||||
Value::Table(t) => t,
|
||||
_ => panic!("EntryHeader is not a table!"),
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
fn build_default_header() -> Value { // BTreeMap<String, Value>
|
||||
let mut m = BTreeMap::new();
|
||||
|
||||
|
|
Loading…
Reference in a new issue