stream: modify HashMap to StreamMap in example. (#3925)

This commit is contained in:
oiovoyo 2021-07-05 22:10:55 +08:00 committed by GitHub
parent 37e60fc7f9
commit 2e7de1ae1d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -364,11 +364,11 @@ impl<K, V> StreamMap<K, V> {
/// # Examples
///
/// ```
/// use std::collections::HashMap;
/// use tokio_stream::{StreamMap, pending};
///
/// let mut a = HashMap::new();
/// let mut a = StreamMap::new();
/// assert!(a.is_empty());
/// a.insert(1, "a");
/// a.insert(1, pending::<i32>());
/// assert!(!a.is_empty());
/// ```
pub fn is_empty(&self) -> bool {