mirror of
https://github.com/tokio-rs/tokio.git
synced 2026-08-29 00:00:11 +02:00
stream: modify HashMap to StreamMap in example. (#3925)
This commit is contained in:
@@ -364,11 +364,11 @@ impl<K, V> StreamMap<K, V> {
|
|||||||
/// # Examples
|
/// # Examples
|
||||||
///
|
///
|
||||||
/// ```
|
/// ```
|
||||||
/// use std::collections::HashMap;
|
/// use tokio_stream::{StreamMap, pending};
|
||||||
///
|
///
|
||||||
/// let mut a = HashMap::new();
|
/// let mut a = StreamMap::new();
|
||||||
/// assert!(a.is_empty());
|
/// assert!(a.is_empty());
|
||||||
/// a.insert(1, "a");
|
/// a.insert(1, pending::<i32>());
|
||||||
/// assert!(!a.is_empty());
|
/// assert!(!a.is_empty());
|
||||||
/// ```
|
/// ```
|
||||||
pub fn is_empty(&self) -> bool {
|
pub fn is_empty(&self) -> bool {
|
||||||
|
|||||||
Reference in New Issue
Block a user