10

Make RSplit<T, P>: Clone not require T: Clone by calebsander · Pull Reques...

 2 years ago
source link: https://github.com/rust-lang/rust/pull/90117
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

Copy link

Contributor

calebsander commented 8 days ago

This addresses a TODO comment. The behavior of #[derive(Clone)] does result in a T: Clone requirement. Playground example:
https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=a8b1a9581ff8893baf401d624a53d35b

Add a manual Clone implementation, mirroring Split and SplitInclusive.
(R)?SplitN(Mut)? don't have any Clone implementations, but I'll leave that for its own pull request.


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK