Skip to content

impl PartialOrd<str> for StringΒ #82990

Open
@tmandry

Description

    let a = "a".to_string();
    // compiles
    println!("{}", "b" > &a);
    // doesn't compile
    // println!("{}", &a < "b");

We have impl PartialEq<str> for String and impl PartialEq<&str> for String, but no matching impls for PartialOrd. Can we add these impls to round it out?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    A-strArea: str and StringC-enhancementCategory: An issue proposing an enhancement or a PR with one.T-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions