Skip to content

Commit

Permalink
Introduce tower_grpc::metadata::MetadataMap type
Browse files Browse the repository at this point in the history
As per the discussion in tower-rs#90, it wraps http::HeaderMap to abstract
away the fact that tower-grpc is HTTP based. At this time this class
is a pure wrapper that does not actually implement any of the gRPC
metadata specific stuff (such as binary fields), that will come later.
  • Loading branch information
per-gron committed Dec 5, 2018
1 parent ca2ee54 commit 7e22164
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/metadata_map.rs
Expand Up @@ -220,7 +220,7 @@ impl MetadataMap {
///
/// assert_eq!(2, map.len());
///
/// map.append("x-host-ip", "text/html".parse().unwrap());
/// map.append("x-mime-type", "text/html".parse().unwrap());
///
/// assert_eq!(3, map.len());
/// ```
Expand All @@ -241,12 +241,12 @@ impl MetadataMap {
///
/// assert_eq!(0, map.keys_len());
///
/// map.insert("x-host-ip", "127.0.0.1".parse().unwrap());
/// map.insert("x-host-name", "localhost".parse().unwrap());
/// map.insert("x-mime", "text/plain".parse().unwrap());
/// map.insert("x-host", "localhost".parse().unwrap());
///
/// assert_eq!(2, map.keys_len());
///
/// map.append("x-host-ip", "text/html".parse().unwrap());
/// map.insert("x-mime", "text/html".parse().unwrap());
///
/// assert_eq!(2, map.keys_len());
/// ```
Expand Down

0 comments on commit 7e22164

Please sign in to comment.