comparison rust/hg-core/src/utils/files.rs @ 51566:529a655874fb stable

matchers: fix the bug in rust PatternMatcher that made it cut off early This brings the rust output in line with the Python output.
author Arseniy Alekseyev <aalekseyev@janestreet.com>
date Fri, 12 Apr 2024 14:09:55 +0100
parents 532e74ad3ff6
children
comparison
equal deleted inserted replaced
51565:95c083d21ac6 51566:529a655874fb
116 let mut dirs = Ancestors { next: Some(path) }; 116 let mut dirs = Ancestors { next: Some(path) };
117 if !path.is_empty() { 117 if !path.is_empty() {
118 dirs.next(); // skip itself 118 dirs.next(); // skip itself
119 } 119 }
120 dirs 120 dirs
121 }
122
123 pub fn dir_ancestors(path: &HgPath) -> Ancestors {
124 Ancestors { next: Some(path) }
121 } 125 }
122 126
123 /// Returns an iterator yielding ancestor directories of the given repository 127 /// Returns an iterator yielding ancestor directories of the given repository
124 /// path. 128 /// path.
125 /// 129 ///