Skip to content

Commit 29d97b9

Browse files
committed
ptest: Use 1-based indices for tests
Adjust the printed numbers, as well as the values to `--test` so that the tests are numbered starting from 1 instead of zero. Signed-off-by: David Brown <david.brown@linaro.org>
1 parent 0ceb85a commit 29d97b9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ptest/src/main.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ impl Matrix {
264264
/// Print out all of the feature sets.
265265
fn show(&self) {
266266
for (i, feature) in self.envs.iter().enumerate() {
267-
println!("{:3}. {}", i, feature.simple_textual());
267+
println!("{:3}. {}", i + 1, feature.simple_textual());
268268
}
269269
}
270270

@@ -276,7 +276,7 @@ impl Matrix {
276276
.envs
277277
.into_iter()
278278
.enumerate()
279-
.filter(|(ind, _)| pick.contains(ind))
279+
.filter(|(ind, _)| pick.contains(&(ind + 1)))
280280
.map(|(_, item)| item)
281281
.collect();
282282
Matrix { envs }

0 commit comments

Comments
 (0)