Add missing "basic usage" sections to docs, fix review comments.
This commit is contained in:
parent
a8df890437
commit
6799895b6d
@ -347,10 +347,15 @@ impl<K: Ord, V> BTreeMap<K, V> {
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
/// Basic usage:
|
||||
///
|
||||
/// ```
|
||||
/// use std::collections::BTreeMap;
|
||||
///
|
||||
/// let mut map: BTreeMap<&str, isize> = BTreeMap::new();
|
||||
/// let mut map = BTreeMap::new();
|
||||
///
|
||||
/// // entries can now be inserted into the empty map
|
||||
/// a.insert(1, "a");
|
||||
/// ```
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
pub fn new() -> BTreeMap<K, V> {
|
||||
@ -364,6 +369,8 @@ impl<K: Ord, V> BTreeMap<K, V> {
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
/// Basic usage:
|
||||
///
|
||||
/// ```
|
||||
/// use std::collections::BTreeMap;
|
||||
///
|
||||
@ -385,6 +392,8 @@ impl<K: Ord, V> BTreeMap<K, V> {
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
/// Basic usage:
|
||||
///
|
||||
/// ```
|
||||
/// use std::collections::BTreeMap;
|
||||
///
|
||||
@ -408,6 +417,8 @@ impl<K: Ord, V> BTreeMap<K, V> {
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
/// Basic usage:
|
||||
///
|
||||
/// ```
|
||||
/// use std::collections::BTreeMap;
|
||||
///
|
||||
@ -428,6 +439,8 @@ impl<K: Ord, V> BTreeMap<K, V> {
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
/// Basic usage:
|
||||
///
|
||||
/// ```
|
||||
/// use std::collections::BTreeMap;
|
||||
///
|
||||
@ -460,6 +473,8 @@ impl<K: Ord, V> BTreeMap<K, V> {
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
/// Basic usage:
|
||||
///
|
||||
/// ```
|
||||
/// use std::collections::BTreeMap;
|
||||
///
|
||||
@ -490,6 +505,8 @@ impl<K: Ord, V> BTreeMap<K, V> {
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
/// Basic usage:
|
||||
///
|
||||
/// ```
|
||||
/// use std::collections::BTreeMap;
|
||||
///
|
||||
@ -519,6 +536,8 @@ impl<K: Ord, V> BTreeMap<K, V> {
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
/// Basic usage:
|
||||
///
|
||||
/// ```
|
||||
/// #![feature(btree_range, collections_bound)]
|
||||
///
|
||||
@ -592,6 +611,8 @@ impl<K: Ord, V> BTreeMap<K, V> {
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
/// Basic usage:
|
||||
///
|
||||
/// ```
|
||||
/// #![feature(btree_range, collections_bound)]
|
||||
///
|
||||
@ -667,6 +688,8 @@ impl<K: Ord, V> BTreeMap<K, V> {
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
/// Basic usage:
|
||||
///
|
||||
/// ```
|
||||
/// use std::collections::BTreeMap;
|
||||
///
|
||||
@ -1275,6 +1298,8 @@ impl<K, V> BTreeMap<K, V> {
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
/// Basic usage:
|
||||
///
|
||||
/// ```
|
||||
/// use std::collections::BTreeMap;
|
||||
///
|
||||
@ -1305,6 +1330,8 @@ impl<K, V> BTreeMap<K, V> {
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
/// Basic usage:
|
||||
///
|
||||
/// ```
|
||||
/// use std::collections::BTreeMap;
|
||||
///
|
||||
@ -1338,6 +1365,8 @@ impl<K, V> BTreeMap<K, V> {
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
/// Basic usage:
|
||||
///
|
||||
/// ```
|
||||
/// use std::collections::BTreeMap;
|
||||
///
|
||||
@ -1357,6 +1386,8 @@ impl<K, V> BTreeMap<K, V> {
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
/// Basic usage:
|
||||
///
|
||||
/// ```
|
||||
/// use std::collections::BTreeMap;
|
||||
///
|
||||
@ -1376,6 +1407,8 @@ impl<K, V> BTreeMap<K, V> {
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
/// Basic usage:
|
||||
///
|
||||
/// ```
|
||||
/// use std::collections::BTreeMap;
|
||||
///
|
||||
@ -1393,6 +1426,8 @@ impl<K, V> BTreeMap<K, V> {
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
/// Basic usage:
|
||||
///
|
||||
/// ```
|
||||
/// use std::collections::BTreeMap;
|
||||
///
|
||||
|
Loading…
x
Reference in New Issue
Block a user