pub unsafe fn copy_within_unchecked<R>(&mut self, src: R, dest: usize)
	where R: RangeExt<usize> {
		if let Some(this) = self.coerce_mut::<T, Lsb0>() {
			return this.sp_copy_within_unchecked(src, dest);
		}
		if let Some(this) = self.coerce_mut::<T, Msb0>() {
			return this.sp_copy_within_unchecked(src, dest);
		}
		let source = src.normalize(0, self.len());
		let source_len = source.len();
		let rev = source.contains(&dest);
		let dest = dest .. dest + source_len;
		for (from, to) in self
			.get_unchecked(source)
			.as_bitptr_range()
			.zip(self.get_unchecked_mut(dest).as_mut_bitptr_range())
			.bidi(rev)
		{
			to.write(from.read());
		}
	}
/// Copies bits from one region of the bit-slice to another region of
/// itself, without doing bounds checks.
///
/// The regions are allowed to overlap.
///
/// ## Parameters
///
/// - `&mut self`
/// - `src`: The range within `self` from which to copy.
/// - `dst`: The starting index within `self` at which to paste.
///
/// ## Effects
///
/// `self[src]` is copied to `self[dest .. dest + src.len()]`. The bits of
/// `self[src]` are in an unspecified, but initialized, state.
///
/// ## Safety
///
/// `src.end()` and `dest + src.len()` must be entirely within bounds.
///
/// ## Examples
///
/// ```rust
/// use bitvec::prelude::*;
///
/// let mut data = 0b1011_0000u8;
/// let bits = data.view_bits_mut::<Msb0>();
///
/// unsafe {
///   bits.copy_within_unchecked(.. 4, 2);
/// }
/// assert_eq!(data, 0b1010_1100);
/// ```
Copies bits from one region of the bit-slice to another region of
itself, without doing bounds checks.

The regions are allowed to overlap.
Copies bits from one region of the bit - slice to another region of itself without doing bounds checks . The regions are allowed to overlap .
pub unsafe fn copy_within_unchecked<R>(&mut self, src: R, dest: usize)
	where R: RangeExt<usize> {
		if let Some(this) = self.coerce_mut::<T, Lsb0>() {
			return this.sp_copy_within_unchecked(src, dest);
		}
		if let Some(this) = self.coerce_mut::<T, Msb0>() {
			return this.sp_copy_within_unchecked(src, dest);
		}
		let source = src.normalize(0, self.len());
		let source_len = source.len();
		let rev = source.contains(&dest);
		let dest = dest .. dest + source_len;
		for (from, to) in self
			.get_unchecked(source)
			.as_bitptr_range()
			.zip(self.get_unchecked_mut(dest).as_mut_bitptr_range())
			.bidi(rev)
		{
			to.write(from.read());
		}
	}
pub unsafe fn copy_within_unchecked < R > ( & mut self , src : R , dest : usize ) where R : RangeExt < usize > { if let Some ( this ) = self . coerce_mut :: < T , Lsb0 > ( ) { return this . sp_copy_within_unchecked ( src , dest ) ; } if let Some ( this ) = self . coerce_mut :: < T , Msb0 > ( ) { return this . sp_copy_within_unchecked ( src , dest ) ; } let source = src . normalize ( 0 , self . len ( ) ) ; let source_len = source . len ( ) ; let rev = source . contains ( & dest ) ; let dest = dest .. dest + source_len ; for ( from , to ) in self . get_unchecked ( source ) . as_bitptr_range ( ) . zip ( self . get_unchecked_mut ( dest ) . as_mut_bitptr_range ( ) ) . bidi ( rev ) { to . write ( from . read ( ) ) ; } }
Copies bits from one region of the bit-slice to another region of
itself, without doing bounds checks.
Copies bits from one region of the bit - slice to another region of itself without doing bounds checks .
&mut self
src
R
dest
usize
&mut self
None
src
R
The range within `self` from which to copy.
The range within ` self ` from which to copy .
dest
usize
dst
The starting index within `self` at which to paste.
The starting index within ` self ` at which to paste .
effects
`self[src]` is copied to `self[dest ..
` self [ src ] ` is copied to ` self [ dest ..
safety
`src.end()` and `dest + src.len()` must be entirely within bounds.
` src . end () ` and ` dest + src . len () ` must be entirely within bounds .
examples
```rust
use bitvec::prelude::*.



unsafe {
bits.copy_within_unchecked(..
` ` ` rust use bitvec :: prelude :: * . unsafe { bits . copy_within_unchecked ( ..