about summary refs log tree commit diff
path: root/library/alloc
diff options
context:
space:
mode:
authorFrank Steffahn <frank.steffahn@stu.uni-kiel.de>2021-08-13 14:41:50 +0200
committerFrank Steffahn <frank.steffahn@stu.uni-kiel.de>2021-08-13 15:27:30 +0200
commit3f0d04e97b6e595fdff4895dfc4a35a2bd39f739 (patch)
tree1d9273c5de40cabf50abd8fbca53de179a1437b3 /library/alloc
parent43046860496df09d9e59a679ac3a20e1820619ee (diff)
downloadrust-3f0d04e97b6e595fdff4895dfc4a35a2bd39f739.tar.gz
rust-3f0d04e97b6e595fdff4895dfc4a35a2bd39f739.zip
Improve wording, correct -> tight.
Diffstat (limited to 'library/alloc')
-rw-r--r--library/alloc/tests/slice.rs12
1 files changed, 6 insertions, 6 deletions
diff --git a/library/alloc/tests/slice.rs b/library/alloc/tests/slice.rs
index 198f467eea3..13b8c059e37 100644
--- a/library/alloc/tests/slice.rs
+++ b/library/alloc/tests/slice.rs
@@ -1001,7 +1001,7 @@ fn test_split_iterators_size_hint() {
         Lower,
         Upper,
     }
-    fn assert_precise_size_hints(mut it: impl Iterator, which: Bounds, context: impl fmt::Display) {
+    fn assert_tight_size_hints(mut it: impl Iterator, which: Bounds, ctx: impl fmt::Display) {
         match which {
             Bounds::Lower => {
                 let mut lower_bounds = vec![it.size_hint().0];
@@ -1009,7 +1009,7 @@ fn test_split_iterators_size_hint() {
                     lower_bounds.push(it.size_hint().0);
                 }
                 let target: Vec<_> = (0..lower_bounds.len()).rev().collect();
-                assert_eq!(lower_bounds, target, "incorrect lower bounds: {}", context);
+                assert_eq!(lower_bounds, target, "lower bounds incorrect or not tight: {}", ctx);
             }
             Bounds::Upper => {
                 let mut upper_bounds = vec![it.size_hint().1];
@@ -1017,7 +1017,7 @@ fn test_split_iterators_size_hint() {
                     upper_bounds.push(it.size_hint().1);
                 }
                 let target: Vec<_> = (0..upper_bounds.len()).map(Some).rev().collect();
-                assert_eq!(upper_bounds, target, "incorrect upper bounds: {}", context);
+                assert_eq!(upper_bounds, target, "upper bounds incorrect or not tight: {}", ctx);
             }
         }
     }
@@ -1028,13 +1028,13 @@ fn test_split_iterators_size_hint() {
         // p: predicate, b: bound selection
         for (p, b) in [
             // with a predicate always returning false, the split*-iterators
-            // become maximally short, so the size_hint lower bounds are correct
+            // become maximally short, so the size_hint lower bounds are tight
             ((|_| false) as fn(&_) -> _, Bounds::Lower),
             // with a predicate always returning true, the split*-iterators
-            // become maximally long, so the size_hint upper bounds are correct
+            // become maximally long, so the size_hint upper bounds are tight
             ((|_| true) as fn(&_) -> _, Bounds::Upper),
         ] {
-            use assert_precise_size_hints as a;
+            use assert_tight_size_hints as a;
             use format_args as f;
 
             a(v.split(p), b, "split");