pub fn pop(&mut self) -> Option<bool> {
		match self.len() {
			0 => None,
			n => unsafe {
				let new_len = n - 1;
				let out = Some(*self.get_unchecked(new_len));
				self.set_len_unchecked(new_len);
				out
			},
		}
	}
/// Attempts to remove the trailing bit from the bit-vector.
///
/// This returns `None` if the bit-vector is empty.
///
/// ## Original
///
/// [`Vec::pop`](alloc::vec::Vec::pop)
///
/// ## Examples
///
/// ```rust
/// use bitvec::prelude::*;
///
/// let mut bv = bitvec![0, 1];
/// assert!(bv.pop().unwrap());
/// assert!(!bv.pop().unwrap());
/// assert!(bv.pop().is_none());
/// ```
Attempts to remove the trailing bit from the bit-vector.
This returns `None` if the bit-vector is empty.
Attempts to remove the trailing bit from the bit - vector . This returns ` None ` if the bit - vector is empty .
pub fn pop(&mut self) -> Option<bool> {
		match self.len() {
			0 => None,
			n => unsafe {
				let new_len = n - 1;
				let out = Some(*self.get_unchecked(new_len));
				self.set_len_unchecked(new_len);
				out
			},
		}
	}
pub fn pop ( & mut self ) -> Option < bool > { match self . len ( ) { 0 => None , n => unsafe { let new_len = n - 1 ; let out = Some ( * self . get_unchecked ( new_len ) ) ; self . set_len_unchecked ( new_len ) ; out } , } }
Attempts to remove the trailing bit from the bit-vector.
Attempts to remove the trailing bit from the bit - vector .
&mut self
&mut self
original
None
examples
```rust
use bitvec::prelude::*.


` ` ` rust use bitvec :: prelude :: * .