Skip to content

Commit

Permalink
[core] Commit's Debug impl just forwards to the inner field
Browse files Browse the repository at this point in the history
  • Loading branch information
anp committed Aug 24, 2020
1 parent fa880b1 commit 739692d
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ where
/// the runtime. Commits should be shared and used within the context of a
/// single [`crate::runtime::Revision`], being re-loaded from the state variable
/// each time.
#[derive(Debug, Eq, PartialEq)]
#[derive(Eq, PartialEq)]
pub struct Commit<State> {
id: CallId,
inner: Arc<State>,
Expand All @@ -259,6 +259,15 @@ impl<State> Clone for Commit<State> {
}
}

impl<State> Debug for Commit<State>
where
State: Debug,
{
fn fmt(&self, f: &mut Formatter) -> FmtResult {
self.inner.fmt(f)
}
}

impl<State> Deref for Commit<State> {
type Target = State;

Expand Down

0 comments on commit 739692d

Please sign in to comment.