File: Splice.md

package info (click to toggle)
rust-coreutils 0.7.0-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 505,620 kB
  • sloc: ansic: 103,594; asm: 28,570; sh: 8,910; python: 5,581; makefile: 472; cpp: 97; javascript: 72
file content (17 lines) | stat: -rw-r--r-- 507 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# Splicing Iteration

This adapts a [`Drain`] to overwrite the drained section with the contents of
another iterator.

When this splice is destroyed, the drained section of the source bit-vector is
replaced with the contents of the replacement iterator. If the replacement is
not the same length as the drained section, then the bit-vector is resized to
fit.

See [`BitVec::splice()`] for more information.

## Original

[`vec::Splice`](alloc::vec::Splice)

[`BitVec::splice()`]: crate::vec::BitVec::splice