This is an archive of the discontinued Mercurial Phabricator instance.

rust-hg-path: implement `Display` for `HgPath` and `HgPathBuf`

Authored by Alphare on Nov 29 2019, 12:56 PM.



This is useful when debugging, to get a human readable output instead of an
array of u8.

Diff Detail

rHG Mercurial
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

Alphare created this revision.Nov 29 2019, 12:56 PM
kevincox requested changes to this revision.Dec 2 2019, 8:04 AM
kevincox added inline comments.

This looks more like a Debug format than a Display format. For Display I would just do write!(f, "{}", String::from_utf8_lossy(&self.inner))`

This revision now requires changes to proceed.Dec 2 2019, 8:04 AM
Alphare marked an inline comment as done.Dec 2 2019, 9:20 AM
Alphare updated this revision to Diff 18421.
kevincox accepted this revision.Dec 2 2019, 10:24 AM
pulkit accepted this revision.Dec 10 2019, 10:09 AM
This revision is now accepted and ready to land.Dec 10 2019, 10:09 AM