Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
glebpom committed Jul 20, 2023
1 parent a07b7f5 commit f5e9441
Show file tree
Hide file tree
Showing 3 changed files with 108 additions and 105 deletions.
2 changes: 1 addition & 1 deletion src/header/map.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2059,7 +2059,7 @@ impl<T> Extend<(Option<HeaderName>, T)> for HeaderMap<T> {
};

'outer: loop {
let mut entry = match self.entry2(key) {
let mut entry = match self.try_entry2(key).expect("size overflows MAX_SIZE") {
Entry::Occupied(mut e) => {
// Replace all previous values while maintaining a handle to
// the entry.
Expand Down
4 changes: 2 additions & 2 deletions src/header/value.rs
Original file line number Diff line number Diff line change
Expand Up @@ -488,8 +488,8 @@ mod from_header_name_tests {
#[test]
fn it_can_insert_header_name_as_header_value() {
let mut map = HeaderMap::new();
map.try_insert(name::UPGRADE, name::SEC_WEBSOCKET_PROTOCOL.into()).unwrap();
map.try_insert(
map.insert(name::UPGRADE, name::SEC_WEBSOCKET_PROTOCOL.into());
map.insert(
name::ACCEPT,
name::HeaderName::from_bytes(b"hello-world").unwrap().into(),
).unwrap();
Expand Down
Loading

0 comments on commit f5e9441

Please sign in to comment.