Add ArrayVec::spare_capacity_mut

This mirrors `Vec::spare_capacity_mut`. Description and example are
taken from this function, too.

CC #278
This commit is contained in:
Tobias Bucher
2024-10-16 18:27:32 +02:00
committed by bluss
parent 0aede877fe
commit 4ef0e89028
2 changed files with 39 additions and 2 deletions
+4 -2
View File
@@ -20,6 +20,8 @@ jobs:
- rust: 1.51.0 # MSRV
features: serde
experimental: false
# doctest of `ArrayVec::spare_capacity_mut` has MSRV 1.55
test-args: --skip spare_capacity_mut
- rust: 1.70.0
features: serde
experimental: false
@@ -51,8 +53,8 @@ jobs:
- name: Tests
run: |
cargo doc --verbose --features "${{ matrix.features }}" --no-deps
cargo test --verbose --features "${{ matrix.features }}"
cargo test --release --verbose --features "${{ matrix.features }}"
cargo test --verbose --features "${{ matrix.features }}" -- ${{ matrix.test-args }}
cargo test --release --verbose --features "${{ matrix.features }}" -- ${{ matrix.test-args }}
- name: Test run benchmarks
if: matrix.bench != ''
run: cargo test -v --benches