[Request] [+ ] D8492: rust-matchers: add TODO about incomplete `Display` for `IncludeMatcher`
Alphare (Raphaël Gomès)
phabricator at mercurial-scm.org
Wed May 6 13:11:12 UTC 2020
Alphare created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.
REVISION SUMMARY
This is purely for future reference, I don't think this is a problem right now,
since the `Display` is *only* used to ease debugging and has no real users.
REPOSITORY
rHG Mercurial
BRANCH
default
REVISION DETAIL
https://phab.mercurial-scm.org/D8492
AFFECTED FILES
rust/hg-core/src/matchers.rs
CHANGE DETAILS
diff --git a/rust/hg-core/src/matchers.rs b/rust/hg-core/src/matchers.rs
--- a/rust/hg-core/src/matchers.rs
+++ b/rust/hg-core/src/matchers.rs
@@ -666,6 +666,12 @@
impl<'a> Display for IncludeMatcher<'a> {
fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error> {
+ // XXX What about exact matches?
+ // I'm not sure it's worth it to clone the HashSet and keep it
+ // around just in case someone wants to display the matcher, plus
+ // it's going to be unreadable after a few entries, but we need to
+ // inform in this display that exact matches are being used and are
+ // (on purpose) missing from the `includes`.
write!(
f,
"IncludeMatcher(includes='{}')",
To: Alphare, #hg-reviewers
Cc: mercurial-patches, mercurial-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mercurial-scm.org/pipermail/mercurial-patches/attachments/20200506/c75e1c46/attachment-0001.html>
More information about the Mercurial-patches
mailing list