Skip to content

std::select::select only works on ports of the same type #10624

Closed
@mstewartgallus

Description

@mstewartgallus

Currently, std::select::select is defined like pub fn select<A: Select>(ports: &mut [A]) -> uint but that is too strict. What if one wants to select over two ports of different types? It seems ugly to me that the alternative is to box the ports into pub fn select(ports: &mut [&Select]) but I can't think of a better alternative. This issue also applies to selecting between a Port, and a PortOne. I guess another way to work around this would be to implement Select for &Select objects.

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