changeset 44880:de0fb4463a3d

rust-matchers: add TODO about incomplete `Display` for `IncludeMatcher` 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. Differential Revision: https://phab.mercurial-scm.org/D8492
author Raphaël Gomès <rgomes@octobus.net>
date Wed, 06 May 2020 14:33:46 +0200
parents e0414fcd35e0
children 5c49a4fdb238
files rust/hg-core/src/matchers.rs
diffstat 1 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/rust/hg-core/src/matchers.rs	Wed May 06 11:17:27 2020 +0200
+++ b/rust/hg-core/src/matchers.rs	Wed May 06 14:33:46 2020 +0200
@@ -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='{}')",