impl Debug for UpdateHook

This commit is contained in:
Matthias Beyer 2016-09-07 20:54:44 +02:00
parent c9c535f46c
commit bcf91780aa

View file

@ -11,7 +11,6 @@ use libimagstore::hook::accessor::StoreIdAccessor;
use vcs::git::runtime::Runtime as GRuntime;
#[derive(Debug)]
pub struct UpdateHook {
storepath: PathBuf,
@ -32,6 +31,16 @@ impl UpdateHook {
}
impl Debug for UpdateHook {
fn fmt(&self, fmt: &mut Formatter) -> RResult<(), FmtError> {
write!(fmt, "UpdateHook(storepath={:?}, repository={}, pos={:?}, cfg={:?}",
self.storepath,
(if self.runtime.has_repository() { "Some(_)" } else { "None" }),
self.position,
self.runtime.has_config())
}
}
impl Hook for UpdateHook {
fn name(&self) -> &'static str {