8000 Either::as_ref method · Issue #31 · rayon-rs/either · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Either::as_ref method #31
Open
Open
@mexus

Description

@mexus

Hi everyone,

I've just hit an issue while trying to replace an impl AsRef with a concrete Either type in a return position, here's an example: https://play.rust-lang.org/?gist=1f4771605ae47ea7e4e10881a994a2dc&version=stable&mode=debug&edition=2015

I believe it happens because Either::as_ref method effectively hides the AsRef::as_ref method :(

Shouldn't it be renamed to something like to_ref so it doesn't overlap with the AsRef trait, or is there any reason behind this specific name? The same goes for as_mut and probably for into_iter as well.

Metadata

Metadata

Assignees

No one assigned

    Labels

    potential-2.0potential changes for `either` 2.0

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0