[Updated] D8492: rust-matchers: add TODO about incomplete `Display` for `IncludeMatcher`

Alphare (Raphaël Gomès) phabricator at mercurial-scm.org
Thu May 7 18:20:58 UTC 2020


Closed by commit rHGde0fb4463a3d: rust-matchers: add TODO about incomplete `Display` for `IncludeMatcher` (authored by Alphare).
This revision was automatically updated to reflect the committed changes.
This revision was not accepted when it landed; it landed in state "Needs Review".

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D8492?vs=21269&id=21310

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D8492/new/

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
@@ -670,6 +670,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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial-patches/attachments/20200507/2217a094/attachment-0002.html>


More information about the Mercurial-patches mailing list