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

Implement Debug for std::vec::IntoIter. #35707

Merged
merged 1 commit into from
Aug 17, 2016

Conversation

frewsxcv
Copy link
Member

Display all the remaining items of the iterator, similar to the Debug
implementation for core::slice::Iter:

rust/src/libcore/slice.rs

Lines 930 to 937 in f0bab98

#[stable(feature = "core_impl_debug", since = "1.9.0")]
impl<'a, T: 'a + fmt::Debug> fmt::Debug for Iter<'a, T> {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
f.debug_tuple("Iter")
.field(&self.as_slice())
.finish()
}
}

Using the as_slice method that was added in:

#35447

Display all the remaining items of the iterator, similar to the `Debug`
implementation for `core::slice::Iter`:

https://github.com/rust-lang/rust/blob/f0bab98695f0a4877daabad9a5b0ba3e66121392/src/libcore/slice.rs#L930-L937

Using the `as_slice` method that was added in:

rust-lang#35447
@alexcrichton
Copy link
Member

@bors: r+ bc52bdc

Thanks!

@alexcrichton alexcrichton added the relnotes Marks issues that should be documented in the release notes of the next release. label Aug 16, 2016
@eddyb
Copy link
Member

eddyb commented Aug 17, 2016

@bors rollup

sophiajt pushed a commit to sophiajt/rust that referenced this pull request Aug 17, 2016
…xcrichton

Implement `Debug` for `std::vec::IntoIter`.

Display all the remaining items of the iterator, similar to the `Debug`
implementation for `core::slice::Iter`:

https://github.com/rust-lang/rust/blob/f0bab98695f0a4877daabad9a5b0ba3e66121392/src/libcore/slice.rs#L930-L937

Using the `as_slice` method that was added in:

rust-lang#35447
bors added a commit that referenced this pull request Aug 17, 2016
sophiajt pushed a commit to sophiajt/rust that referenced this pull request Aug 17, 2016
…xcrichton

Implement `Debug` for `std::vec::IntoIter`.

Display all the remaining items of the iterator, similar to the `Debug`
implementation for `core::slice::Iter`:

https://github.com/rust-lang/rust/blob/f0bab98695f0a4877daabad9a5b0ba3e66121392/src/libcore/slice.rs#L930-L937

Using the `as_slice` method that was added in:

rust-lang#35447
bors added a commit that referenced this pull request Aug 17, 2016
@bors bors merged commit bc52bdc into rust-lang:master Aug 17, 2016
@frewsxcv frewsxcv deleted the vec-into-iter-debug branch August 18, 2016 03:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
relnotes Marks issues that should be documented in the release notes of the next release.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants