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

libp2p deprecation warnings, suggests Keypair::into_ed25519 #295

Closed
adzialocha opened this issue Mar 16, 2023 · 6 comments
Closed

libp2p deprecation warnings, suggests Keypair::into_ed25519 #295

adzialocha opened this issue Mar 16, 2023 · 6 comments

Comments

@adzialocha
Copy link
Member

adzialocha commented Mar 16, 2023

This makes clippy currently sad 😿 :

warning: use of deprecated tuple variant `libp2p::libp2p_identity::Keypair::Ed25519`: This enum will be made opaque in the future, use `Keypair::into_ed25519` instead.
  --> aquadoggo/src/network/identity.rs:50:22
   |
50 |             Keypair::Ed25519(key_pair) => key_pair.secret(),
   |                      ^^^^^^^
   |
   = note: `#[warn(deprecated)]` on by default

warning: use of deprecated tuple variant `libp2p::libp2p_identity::Keypair::Ed25519`: This enum will be made opaque in the future, use `Keypair::into_ed25519` instead.
  --> aquadoggo/src/network/identity.rs:82:33
   |
82 |         let key_pair = Keypair::Ed25519(private_key.into());
   |                                 ^^^^^^^

warning: use of deprecated field `libp2p::libp2p_identity::Keypair::Ed25519::0`: This enum will be made opaque in the future, use `Keypair::into_ed25519` instead.
  --> aquadoggo/src/network/identity.rs:50:30
   |
50 |             Keypair::Ed25519(key_pair) => key_pair.secret(),
   |                              ^^^^^^^^
@adzialocha adzialocha changed the title libp2p deprecation warnings Keypair::into_ed25519 libp2p deprecation warnings, suggests Keypair::into_ed25519 Mar 16, 2023
@mycognosist
Copy link
Contributor

Thanks for flagging this! I'm on it.

@mycognosist
Copy link
Contributor

The changes to the API are quite painful. I have a working solution but it requires inefficient type transformations. I'll wait a little bit until the changes from this PR are released: https://github.com/libp2p/rust-libp2p/pull/3626/files

@adzialocha
Copy link
Member Author

The changes to the API are quite painful. I have a working solution but it requires inefficient type transformations. I'll wait a little bit until the changes from this PR are released: https://github.com/libp2p/rust-libp2p/pull/3626/files

Oh yes, this looks ugly. We could add attributes to ignore these warnings and add a comment to linking to this issue?

@mycognosist
Copy link
Contributor

Oh yes, this looks ugly. We could add attributes to ignore these warnings and add a comment to linking to this issue?

That's a good idea. Do you know how to silence these warnings? #[allow(clippy::deprecated)] is not having the desired effect for me.

@adzialocha
Copy link
Member Author

adzialocha commented Mar 17, 2023

Oh yes, this looks ugly. We could add attributes to ignore these warnings and add a comment to linking to this issue?

That's a good idea. Do you know how to silence these warnings? #[allow(clippy::deprecated)] is not having the desired effect for me.

How is #[allow(deprecated)] (without the clippy part)?

@mycognosist
Copy link
Contributor

Ah! That's the one. Thanks :)

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

2 participants