]> git.lizzy.rs Git - rust.git/commit
Auto merge of #35559 - frewsxcv:slice-iter-as-ref, r=alexcrichton
authorbors <bors@rust-lang.org>
Wed, 17 Aug 2016 02:44:10 +0000 (19:44 -0700)
committerGitHub <noreply@github.com>
Wed, 17 Aug 2016 02:44:10 +0000 (19:44 -0700)
commit9376da6f77e8b7ed204ee704b29e96213b69d0f1
tree5a4db468b06bcd80143506bbcc1597c876aa2a7a
parent1bf5fa3269ba32ae21e349ac675bdedcc7e99a66
parentdc22186efb7d6ea5fff2fc1f6d39684ce9633bf7
Auto merge of #35559 - frewsxcv:slice-iter-as-ref, r=alexcrichton

Implement `AsRef<[T]>` for `std::slice::Iter`.

`AsRef` is designed for conversions that are "cheap" (as per
the API docs). It is the case that retrieving the underlying
data of `std::slice::Iter` is cheap. In my opinion, there's no
ambiguity about what slice data will be returned, otherwise,
I would be more cautious about implementing `AsRef`.