Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

core: help the compiler disambiguate #2310

Merged
merged 2 commits into from Oct 27, 2021
Merged

Conversation

wngr
Copy link
Contributor

@wngr wngr commented Oct 25, 2021

when pulling in libp2p as a dependency and compiling for wasm32-unknown-unknown, I hit this error:

    Checking libp2p-core v0.30.0-rc.1 (https://github.com/wngr/rust-libp2p?branch=wasm-support#19e47553)
error[E0283]: type annotations needed
  --> /home/ow/.cargo/git/checkouts/rust-libp2p-8eaa3598de58093a/19e4755/core/src/connection/pool/concurrent_dial.rs:84:28
   |
84 |             if dials.len() == concurrency_factor.get().into() {
   |                            ^^ ------------------------------- this method call resolves to `T`
   |                            |
   |                            cannot infer type
   |
   = note: cannot satisfy `usize: PartialEq<_>`

Not sure why this target dependant, and doesn't happen when running cargo check inside rust-libp2p though 馃槙

Copy link
Member

@mxinden mxinden left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for providing the patch right away @wngr! I will include this in the next v0.40.0 release candidate given it is a bug fix.

@mxinden mxinden merged commit 6e76435 into libp2p:master Oct 27, 2021
@wngr wngr deleted the ow/disambiguate branch October 27, 2021 17:49
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.

None yet

2 participants