Page MenuHomePhabricator

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

Authored by Alphare on Fri, Nov 29, 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.Fri, Nov 29, 12:56 PM
kevincox requested changes to this revision.Mon, Dec 2, 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.Mon, Dec 2, 8:04 AM
Alphare marked an inline comment as done.Mon, Dec 2, 9:20 AM
Alphare updated this revision to Diff 18421.
kevincox accepted this revision.Mon, Dec 2, 10:24 AM
pulkit accepted this revision.Tue, Dec 10, 10:09 AM
This revision is now accepted and ready to land.Tue, Dec 10, 10:09 AM