diff --git a/lib/entry/libimagentryutil/src/isa.rs b/lib/entry/libimagentryutil/src/isa.rs index ba634c9c..835fb5e7 100644 --- a/lib/entry/libimagentryutil/src/isa.rs +++ b/lib/entry/libimagentryutil/src/isa.rs @@ -23,6 +23,7 @@ use failure::Error; use toml::Value; use toml_query::read::TomlValueReadTypeExt; use toml_query::insert::TomlValueInsertExt; +use toml_query::delete::TomlValueDeleteExt; /// Trait to check whether an entry is a certain kind of entry /// @@ -71,6 +72,7 @@ use toml_query::insert::TomlValueInsertExt; pub trait Is { fn is(&self) -> Result; fn set_isflag(&mut self) -> Result<()>; + fn remove_isflag(&mut self) -> Result<()>; } impl Is for ::libimagstore::store::Entry { @@ -89,6 +91,13 @@ impl Is for ::libimagstore::store::Entry { .map_err(Error::from) .map(|_| ()) } + + fn remove_isflag(&mut self) -> Result<()> { + self.get_header_mut() + .delete(T::kindflag_header_location()) + .map_err(Error::from) + .map(|_| ()) + } }