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

Clean up the namespacing for sub-behaviors deps p2p code #1556

Closed
MitchTurner opened this issue Dec 15, 2023 · 0 comments · Fixed by #1597
Closed

Clean up the namespacing for sub-behaviors deps p2p code #1556

MitchTurner opened this issue Dec 15, 2023 · 0 comments · Fixed by #1597
Assignees

Comments

@MitchTurner
Copy link
Member

We have a mixed notation for importing and using events and behaviors from sub-behavior crates:

For example, we import the Kademlia:

use libp2p::{
    request_response::{
        Behaviour as RequestResponse,
        Config as RequestResponseConfig,
        Event as RequestResponseEvent,
    },
};

where it would probably be cleaner to import as:

use libp2p::request_response;

and then use like this:

request_response::Event;

or

request_response::Behaviour;

etc

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 a pull request may close this issue.

1 participant