Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inconsistancy with Default. Mutable slices are mising #29244

Closed
WildCryptoFox opened this issue Oct 23, 2015 · 5 comments
Closed

Inconsistancy with Default. Mutable slices are mising #29244

WildCryptoFox opened this issue Oct 23, 2015 · 5 comments
Labels
E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. E-mentor Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.

Comments

@WildCryptoFox
Copy link
Contributor

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)

@Aatch
Copy link
Contributor

Aatch commented Oct 23, 2015

/cc @rust-lang/libs

@Gankra
Copy link
Contributor

Gankra commented Oct 23, 2015

Seems like a trivial omission. Easy to add, doesn't need an RFC.

@Gankra Gankra added E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. E-mentor Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion. A-libs labels Oct 23, 2015
@nxnfufunezn
Copy link
Contributor

I'll take this on..

@Gankra
Copy link
Contributor

Gankra commented Oct 23, 2015

@nxnfufunezn 🙀 It appears that @james-darkfox already picked it up and submitted a PR (see above).

@nxnfufunezn
Copy link
Contributor

😞

@bors bors closed this as completed in 36ce1c0 Oct 24, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. E-mentor Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.
Projects
None yet
Development

No branches or pull requests

4 participants