hyperium / hyper

An HTTP library for Rust
https://hyper.rs
MIT License
14.42k stars 1.59k forks source link

no method named `send_replace` found for struct `Arc<Sender<Option<Connected>>>` #3195

Closed jauderho closed 1 year ago

jauderho commented 1 year ago

Version hyper v0.14.25

Platform Linux 6.2.0-19-generic #19-Ubuntu SMP PREEMPT_DYNAMIC Sat Mar 25 10:22:33 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux

Description While trying to build rustybgp using the following command:

RUSTFLAGS="-C link-arg=-fuse-ld=mold" cargo build --release

Build stopped with the error message:

   Compiling hyper v0.14.25
error[E0599]: no method named `send_replace` found for struct `Arc<Sender<Option<Connected>>>` in the current scope
   --> /home/jauderho/.cargo/registry/src/github.com-1ecc6299db9ec823/hyper-0.14.25/src/client/connect/mod.rs:225:17
    |
225 |         self.tx.send_replace(Some(connected.clone()));
    |                 ^^^^^^^^^^^^ method not found in `Arc<Sender<Option<Connected>>>`

For more information about this error, try `rustc --explain E0599`.
error: could not compile `hyper` due to previous error

Looks like it came from this commit: https://github.com/hyperium/hyper/pull/3144/files

seanmonstar commented 1 year ago

Running cargo update should fix it for you. Likely that method is in a newer version of Tokio than you have in your directory.

palfrey commented 11 months ago

Upgrading minimum tokio to 1.13 as per https://github.com/hyperium/hyper/pull/3345 fixes this one