FIX: Rename ArrayVec .capacity_left() → .remaining_capacity()
This commit is contained in:
+5
-5
@@ -30,15 +30,15 @@ fn test_simple() {
|
||||
#[test]
|
||||
fn test_capacity_left() {
|
||||
let mut vec: ArrayVec<[usize; 4]> = ArrayVec::new();
|
||||
assert_eq!(vec.capacity_left(), 4);
|
||||
assert_eq!(vec.remaining_capacity(), 4);
|
||||
vec.push(1);
|
||||
assert_eq!(vec.capacity_left(), 3);
|
||||
assert_eq!(vec.remaining_capacity(), 3);
|
||||
vec.push(2);
|
||||
assert_eq!(vec.capacity_left(), 2);
|
||||
assert_eq!(vec.remaining_capacity(), 2);
|
||||
vec.push(3);
|
||||
assert_eq!(vec.capacity_left(), 1);
|
||||
assert_eq!(vec.remaining_capacity(), 1);
|
||||
vec.push(4);
|
||||
assert_eq!(vec.capacity_left(), 0);
|
||||
assert_eq!(vec.remaining_capacity(), 0);
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
||||
Reference in New Issue
Block a user