Skip to content

Conversation

seanmonstar
Copy link
Member

This continues #617. Merge conflicts were resolved, and a case of a breaking change was resolved since I forgot try_entry() needed to change return types before we release 1.0. Sigh.

@seanmonstar seanmonstar force-pushed the header-map-try-reserve branch from 2c9de1c to 8f49681 Compare March 4, 2024 14:26
@seanmonstar seanmonstar merged commit caa8b4f into master Mar 4, 2024
@seanmonstar seanmonstar deleted the header-map-try-reserve branch March 4, 2024 15:48
bobrik added a commit to bobrik/tonic that referenced this pull request Oct 15, 2025
We use `try_insert`, which was added in v1.1.0:

* hyperium/http#682

```
error[E0599]: no method named `try_insert` found for mutable reference `&mut HeaderMap` in the current scope
  --> tonic/src/transport/channel/service/user_agent.rs:44:14
   |
42 |           if let Ok(Some(user_agent)) = req
   |  _______________________________________-
43 | |             .headers_mut()
44 | |             .try_insert(USER_AGENT, self.user_agent.clone())
   | |_____________-^^^^^^^^^^
   |
help: there is a method `insert` with a similar name
   |
44 -             .try_insert(USER_AGENT, self.user_agent.clone())
44 +             .insert(USER_AGENT, self.user_agent.clone())
   |
```
bobrik added a commit to bobrik/tonic that referenced this pull request Oct 15, 2025
We use `try_insert`, which was added in v1.1.0:

* hyperium/http#682

```
error[E0599]: no method named `try_insert` found for mutable reference `&mut HeaderMap` in the current scope
  --> tonic/src/transport/channel/service/user_agent.rs:44:14
   |
42 |           if let Ok(Some(user_agent)) = req
   |  _______________________________________-
43 | |             .headers_mut()
44 | |             .try_insert(USER_AGENT, self.user_agent.clone())
   | |_____________-^^^^^^^^^^
   |
help: there is a method `insert` with a similar name
   |
44 -             .try_insert(USER_AGENT, self.user_agent.clone())
44 +             .insert(USER_AGENT, self.user_agent.clone())
   |
```
tottoto added a commit to hyperium/tonic that referenced this pull request Oct 16, 2025
We use `try_insert`, which was added in v1.1.0:

* hyperium/http#682

```
error[E0599]: no method named `try_insert` found for mutable reference `&mut HeaderMap` in the current scope
--> tonic/src/transport/channel/service/user_agent.rs:44:14
   |
42 |           if let Ok(Some(user_agent)) = req
   |  _______________________________________-
43 | |             .headers_mut()
44 | |             .try_insert(USER_AGENT, self.user_agent.clone())
   | |_____________-^^^^^^^^^^
   |
help: there is a method `insert` with a similar name
   |
44 -             .try_insert(USER_AGENT, self.user_agent.clone())
44 +             .insert(USER_AGENT, self.user_agent.clone())
   |
```

Co-authored-by: tottoto <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants