6

Add `slice::{from_ptr_range, from_mut_ptr_range} ` by ibraheemdev · Pull Request...

 2 years ago
source link: https://github.com/rust-lang/rust/pull/89793
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

Member

@m-ou-se m-ou-se left a comment

Apologies.

This looks good to me.

There is just one issue that worries me: There have been (incomplete) plans for quite a while to replace Range by two types: One that is Copy, and one that is an iterator. Using Range in signatures like this makes that change a little bit harder than it already is. Of course, the existing (and stable) .as_ptr_range() already has this problem as it uses Range as its return type. Still, I'm worried about making a potential change to Range even harder by adding the functions in this PR.

That doesn't have to stand in the way of adding these as unstable. I have added this as an unresolved question to the tracking issue, so we can make sure to address it before stabilizing this.

If you can fix the merge conflict, this is ready to merge.


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK