Skip to content

Use Into<String> or ToString::to_string rather than requiring owned Strings up front. Β #168

Open
@gibbz00

Description

Partly a question if there's any reason why the API requires owned strings for constructors and such.

.add_scope(Scope::new("read".to_string()))
.add_scope(Scope::new("write".to_string()))

Could then become:

.add_scope(Scope::new("read"))
.add_scope(Scope::new("write"))

And the method signature would still make it clear that an allocation will take place.

This also applies to the oath2 crate.

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions