-
Notifications
You must be signed in to change notification settings - Fork 4
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
Derive Clone
for HandshakeComplete
#80
Conversation
I've added three commits which should address all clippy warnings, as well as a test warning. |
The changes look good to me! Nevertheless I see from the github actions that it's not building, do you know what's happening? The error is in |
Thanks for taking a look! The build is failing due to an "ambiguous glob re-exports" error:
I haven't touched that file and I'm not able to replicate the error locally when running the build command (probably because I'm running an older version of the compiler and that specific lint was only introduced earlier this year):
|
I'm taking a closer look at Solving the |
I was able to reproduce the build failure with Rust 1.73.0 Perhaps another solution is the following:
Although this may still create downstream problems if an application is matching on the Error cases, which now will be different for the top level Error. I guess your idea is to merge both errors into a single one? That should not break any downstream usage, but it feels a bit wrong to flatten out the error cases of the two modules 🤔 |
The solution you outlined is exactly what I was thinking (using the I've been playing around with a few options this morning but the solution outlined above ends up breaking https://github.com/Kuska-ssb/ssb. There's another solution which seems to work for me; simply replace the glob re-exports with explicit (named) re-exports and alias the error and result types: pub use boxstream::{
BoxStreamRecv, BoxStreamSend, Error as BoxstreamError, Header, Result as BoxstreamResult,
};
pub use handshake::{
Error as HandshakeError, Handshake, Result as HandshakeResult, SendServerAccept,
}; That solution requires minimal changes to the handshake crate, solves the |
This solution looks great to me! And I think it's very clean :) |
On the last run, the examples didn't build with this error:
I guess BTW, the message from @ed255 was myself from my other github account 😅 |
Sorry for all the noise with these failed builds! The commit I just pushed should pass 🤞🏻
I was a bit confused at first but then I saw your bio and understood :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Thanks for all the extra work you did to make all the github actions pass 😄
Simply derives
Clone
for theHandshakeComplete
struct
and addresses clippy lints related to needless borrows.@adria0, would you be able to merge this? I don't have write permissions for the handshake repo.