From 9951422dc462474f9b9763810215ff23bae7be93 Mon Sep 17 00:00:00 2001 From: Matthias Beyer Date: Fri, 12 Feb 2016 22:07:15 +0100 Subject: [PATCH] Impl From for EntryHeader --- libimagstore/src/store.rs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/libimagstore/src/store.rs b/libimagstore/src/store.rs index a0bb1855..f87ef95c 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::From; use std::convert::Into; use toml::{Table, Value}; @@ -745,6 +746,14 @@ impl Into
for EntryHeader { } +impl From
for EntryHeader { + + fn from(t: Table) -> EntryHeader { + EntryHeader { header: Value::Table(t) } + } + +} + fn build_default_header() -> Value { // BTreeMap let mut m = BTreeMap::new();