Skip to content

core::str::Str.as_slice() should be renamed as_str() #14433

Closed
@lilyball

Description

@lilyball

The method as_slice() in the core::str::Str trait should be renamed to as_str(). This avoids the name collision with core::slice::Vector.as_slice() for types that need to implement both Vector and Str (as I believe Vec<Ascii> should).

I'm filing this issue now to give a chance for anyone to suggest any reasons why this is a bad idea. Otherwise I will go ahead and make the change myself.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions