Make RSplit<T, P>: Clone not require T: Clone by calebsander · Pull Reques...
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.
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.
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK