diff --git a/libimagstore/src/store.rs b/libimagstore/src/store.rs index 1e289622..a0bb1855 100644 --- a/libimagstore/src/store.rs +++ b/libimagstore/src/store.rs @@ -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 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 let mut m = BTreeMap::new();