Impl Debug for DeleteHook

This commit is contained in:
Matthias Beyer 2016-09-17 17:23:34 +02:00
parent 994d88e65d
commit 47646d608b

View file

@ -13,7 +13,6 @@ use vcs::git::error::GitHookErrorKind as GHEK;
use vcs::git::error::MapErrInto;
use vcs::git::runtime::Runtime as GRuntime;
#[derive(Debug)]
pub struct DeleteHook {
storepath: PathBuf,
@ -34,6 +33,17 @@ impl DeleteHook {
}
impl Debug for DeleteHook {
fn fmt(&self, fmt: &mut Formatter) -> RResult<(), FmtError> {
write!(fmt, "DeleteHook(storepath={:?}, repository={}, pos={:?}, cfg={:?})",
self.storepath,
(if self.runtime.has_repository() { "Some(_)" } else { "None" }),
self.position,
self.runtime.has_config())
}
}
impl Hook for DeleteHook {
fn name(&self) -> &'static str {