Add a doctest for BTreeSet::new.
This commit is contained in:
parent
ffc111889e
commit
58125e5433
1 changed files with 8 additions and 0 deletions
|
|
@ -64,6 +64,14 @@ pub struct UnionItems<'a, T:'a> {
|
|||
|
||||
impl<T: Ord> BTreeSet<T> {
|
||||
/// Makes a new BTreeSet with a reasonable choice of B.
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
/// ```
|
||||
/// use std::collections::BTreeSet;
|
||||
///
|
||||
/// let mut set: BTreeSet<int> = BTreeSet::new();
|
||||
/// ```
|
||||
#[unstable = "matches collection reform specification, waiting for dust to settle"]
|
||||
pub fn new() -> BTreeSet<T> {
|
||||
BTreeSet { map: BTreeMap::new() }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue