We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a045364 commit 1e28851Copy full SHA for 1e28851
test/test_staticvec.rs
@@ -617,6 +617,10 @@ fn filled_with() {
617
assert_eq!(v[1], 2);
618
assert_eq!(v[2], 3);
619
assert_eq!(v[3], 4);
620
+ let v2 = StaticVec::<i32, 64>::filled_with(|| { 0 });
621
+ assert_eq!(v2.len(), 0);
622
+ assert_eq!(v2.capacity(), 0);
623
+ assert_eq!(v2.remaining_capacity(), 0);
624
}
625
626
#[test]
@@ -627,6 +631,10 @@ fn filled_with_by_index() {
627
631
628
632
629
633
634
+ let v2 = StaticVec::<usize, 0>::filled_with_by_index(|i| i + 1);
635
636
637
630
638
639
640
0 commit comments