Skip to content

Commit 58125e5

Browse files
committed
Add a doctest for BTreeSet::new.
1 parent ffc1118 commit 58125e5

File tree

1 file changed

+8
-0
lines changed
  • src/libcollections/btree

1 file changed

+8
-0
lines changed

src/libcollections/btree/set.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,14 @@ pub struct UnionItems<'a, T:'a> {
6464

6565
impl<T: Ord> BTreeSet<T> {
6666
/// Makes a new BTreeSet with a reasonable choice of B.
67+
///
68+
/// # Examples
69+
///
70+
/// ```
71+
/// use std::collections::BTreeSet;
72+
///
73+
/// let mut set: BTreeSet<int> = BTreeSet::new();
74+
/// ```
6775
#[unstable = "matches collection reform specification, waiting for dust to settle"]
6876
pub fn new() -> BTreeSet<T> {
6977
BTreeSet { map: BTreeMap::new() }

0 commit comments

Comments
 (0)