1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
//! `gapbuf` provides the type [`GapBuffer`].
//! `GapBuffer` has methods similar to `Vec`.
//!
//! # Examples
//!
//! ```
//! #[macro_use]
//! extern crate gapbuf;
//!
//! fn main() {
//!     let mut b = gap_buffer![1, 2, 3];
//!
//!     b.insert(1, 10);
//!     assert_eq!(b, [1, 10, 2, 3]);
//!
//!     b.remove(2);
//!     assert_eq!(b, [1, 10, 3]);
//! }
//!
//! ```
#![cfg_attr(feature = "docs-rs", feature(allocator_api))]

#[macro_use]
mod finally;

#[macro_use]
mod gap_buffer;

pub use gap_buffer::*;