Rollup merge of #82060 - taiki-e:typo, r=m-ou-se
Fix typos in BTreeSet::{first, last} docs map -> set
This commit is contained in:
commit
c7ebc590da
1 changed files with 12 additions and 12 deletions
|
@ -649,12 +649,12 @@ impl<T> BTreeSet<T> {
|
||||||
/// #![feature(map_first_last)]
|
/// #![feature(map_first_last)]
|
||||||
/// use std::collections::BTreeSet;
|
/// use std::collections::BTreeSet;
|
||||||
///
|
///
|
||||||
/// let mut map = BTreeSet::new();
|
/// let mut set = BTreeSet::new();
|
||||||
/// assert_eq!(map.first(), None);
|
/// assert_eq!(set.first(), None);
|
||||||
/// map.insert(1);
|
/// set.insert(1);
|
||||||
/// assert_eq!(map.first(), Some(&1));
|
/// assert_eq!(set.first(), Some(&1));
|
||||||
/// map.insert(2);
|
/// set.insert(2);
|
||||||
/// assert_eq!(map.first(), Some(&1));
|
/// assert_eq!(set.first(), Some(&1));
|
||||||
/// ```
|
/// ```
|
||||||
#[unstable(feature = "map_first_last", issue = "62924")]
|
#[unstable(feature = "map_first_last", issue = "62924")]
|
||||||
pub fn first(&self) -> Option<&T>
|
pub fn first(&self) -> Option<&T>
|
||||||
|
@ -675,12 +675,12 @@ impl<T> BTreeSet<T> {
|
||||||
/// #![feature(map_first_last)]
|
/// #![feature(map_first_last)]
|
||||||
/// use std::collections::BTreeSet;
|
/// use std::collections::BTreeSet;
|
||||||
///
|
///
|
||||||
/// let mut map = BTreeSet::new();
|
/// let mut set = BTreeSet::new();
|
||||||
/// assert_eq!(map.last(), None);
|
/// assert_eq!(set.last(), None);
|
||||||
/// map.insert(1);
|
/// set.insert(1);
|
||||||
/// assert_eq!(map.last(), Some(&1));
|
/// assert_eq!(set.last(), Some(&1));
|
||||||
/// map.insert(2);
|
/// set.insert(2);
|
||||||
/// assert_eq!(map.last(), Some(&2));
|
/// assert_eq!(set.last(), Some(&2));
|
||||||
/// ```
|
/// ```
|
||||||
#[unstable(feature = "map_first_last", issue = "62924")]
|
#[unstable(feature = "map_first_last", issue = "62924")]
|
||||||
pub fn last(&self) -> Option<&T>
|
pub fn last(&self) -> Option<&T>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue