Skip to content

Inconsistancy with Default. Mutable slices are mising #29244

Closed
@WildCryptoFox

Description

@WildCryptoFox

Default is implemented for &'a [T] but not &'a mut [T]. Is there any reason for this? While writing mutually generic code, I needed exactly this. Alternatively the quick work around is to just have my own trait and implement it for both slices.

@rust-lang/libs


My mutually generic code: option_mut and lense (currently working on making lenses mutually generic through the use of option_mut)

Metadata

Metadata

Assignees

No one assigned

    Labels

    E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.E-mentorCall for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions