Skip to content

Make a final decision for the prelude #12

Closed
@ghost

Description

Right now I feel we should go with the following prelude:

pub use crate::future::Future;

pub use crate::io::BufRead as _;
pub use crate::io::Read as _;
pub use crate::io::Seek as _;
pub use crate::io::Write as _;

pub use crate::stream::Stream;

pub use crate::time::Timeout as _;

I don't think we should add or remove anything from this list, but am unsure about which traits should be anonymously imported (as _) and which shouldn't. I feel like fully importing traits like Read could be a potential source of conflicts if the user uses std::io::Read in their code at the same time.

What about trait Stream? Should that one be anonymous or not? In a way, it is fundamental just like Iterator, which is even in the std prelude. So maybe we should import it fully.

But I'm still not 100% decided...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions