Skip to content

Commit 0b1d9c0

Browse files
committed
Merge pull request #19802 from jbranchaud/add-btreeset-new-doctest
Add a doctest for BTreeSet::new. Reviewed-by: Gankro
2 parents 1277666 + 58125e5 commit 0b1d9c0

File tree

1 file changed

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

1 file changed

+8
-0
lines changed

src/libcollections/btree/set.rs

+8
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,14 @@ pub struct UnionItems<'a, T:'a> {
6868

6969
impl<T: Ord> BTreeSet<T> {
7070
/// Makes a new BTreeSet with a reasonable choice of B.
71+
///
72+
/// # Examples
73+
///
74+
/// ```
75+
/// use std::collections::BTreeSet;
76+
///
77+
/// let mut set: BTreeSet<int> = BTreeSet::new();
78+
/// ```
7179
#[unstable = "matches collection reform specification, waiting for dust to settle"]
7280
pub fn new() -> BTreeSet<T> {
7381
BTreeSet { map: BTreeMap::new() }

0 commit comments

Comments
 (0)