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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error Shown in VSCode : add reference here rust-analyzer #2348

Closed
canewsin opened this issue Nov 18, 2021 · 9 comments
Closed

Error Shown in VSCode : add reference here rust-analyzer #2348

canewsin opened this issue Nov 18, 2021 · 9 comments

Comments

@canewsin
Copy link
Contributor

When deriving NetworkBehaviour.
This doesn't stop the code compilations.

Screenshot (23)

Even code examples have these errors.

@elenaf9
Copy link
Contributor

elenaf9 commented Nov 18, 2021

I may have found a fix for the error, @canewsin could you test if you still get it on https://github.com/elenaf9/rust-libp2p/tree/swarm-derive/inject-dial-error?
If this solves it, I'll do a PR.

@canewsin
Copy link
Contributor Author

Issue Fixed.

mxinden pushed a commit that referenced this issue Nov 18, 2021
`NetworkBehaviour::inject_dial_failure` expects a reference for the error, thus
the error should not be cloned when passing it to the inner behaviours in the
`NetworkBehaviour` derivation.

Fixes Issue #2348.
@mxinden
Copy link
Member

mxinden commented Nov 18, 2021

Closing here since #2349 is merged.

@mxinden mxinden closed this as completed Nov 18, 2021
@rkuhn
Copy link
Contributor

rkuhn commented Jan 4, 2022

@mxinden Since this is a show-stopper for releasing against libp2p 0.41, would it be possible to release libp2p-swarm-derive 0.26.1 soon?

@mxinden
Copy link
Member

mxinden commented Jan 10, 2022

I can cut v0.41.2 with this fix. Before I do, would you mind expanding on why this is a show-stopper @rkuhn? I categorized this as a lint thus far.

@rkuhn
Copy link
Contributor

rkuhn commented Jan 11, 2022

Hmm, you’re right — I didn’t actually try building with rustc when I saw the kind of error (which usually means that without a & there is a type error). It is somewhat confusing that all references implement Clone, since that impl is so rarely used.

In any case, I depend on rust-analyzer, and I learnt to only trust its output when there are no errors in the project at all, which means I’d still prefer this to be released sooner rather than later :-)

@rkuhn
Copy link
Contributor

rkuhn commented Jan 11, 2022

Perhaps 0.26.1 of this crate is enough for starters, libp2p 0.41.2 could have more things.

@mxinden
Copy link
Member

mxinden commented Jan 12, 2022

I plan to release v0.42.0 next week. Is that good enough @rkuhn?

@rkuhn
Copy link
Contributor

rkuhn commented Jan 12, 2022

sure!

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

No branches or pull requests

4 participants