Patchwork D8278: rust-core: add missing `Debug` traits

login
register
mail settings
Submitter phabricator
Date March 12, 2020, 11:43 p.m.
Message ID <differential-rev-PHID-DREV-atjqvxxv4mjd35s3lzj7-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/45758/
State Superseded
Headers show

Comments

phabricator - March 12, 2020, 11:43 p.m.
Alphare created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  Turns out you need them when trying to use `hg-core` as a library. Who knew.

REPOSITORY
  rHG Mercurial

BRANCH
  default

REVISION DETAIL
  https://phab.mercurial-scm.org/D8278

AFFECTED FILES
  rust/hg-core/src/dirstate/status.rs
  rust/hg-core/src/lib.rs

CHANGE DETAILS




To: Alphare, #hg-reviewers
Cc: mercurial-devel

Patch

diff --git a/rust/hg-core/src/lib.rs b/rust/hg-core/src/lib.rs
--- a/rust/hg-core/src/lib.rs
+++ b/rust/hg-core/src/lib.rs
@@ -103,6 +103,7 @@ 
     }
 }
 
+#[derive(Debug)]
 pub enum DirstateError {
     Parse(DirstateParseError),
     Pack(DirstatePackError),
diff --git a/rust/hg-core/src/dirstate/status.rs b/rust/hg-core/src/dirstate/status.rs
--- a/rust/hg-core/src/dirstate/status.rs
+++ b/rust/hg-core/src/dirstate/status.rs
@@ -623,6 +623,7 @@ 
     );
 }
 
+#[derive(Debug)]
 pub struct DirstateStatus<'a> {
     pub modified: Vec<Cow<'a, HgPath>>,
     pub added: Vec<Cow<'a, HgPath>>,
@@ -679,6 +680,7 @@ 
     )
 }
 
+#[derive(Debug)]
 pub enum StatusError {
     IO(std::io::Error),
     Path(HgPathError),