Skip to content

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

Merged
bors merged 1 commit into
rust-lang:masterfrom
frewsxcv:vec-into-iter-debug
Aug 17, 2016
Merged

Implement Debug for std::vec::IntoIter.#35707
bors merged 1 commit into
rust-lang:masterfrom
frewsxcv:vec-into-iter-debug

Conversation

@frewsxcv

Copy link
Copy Markdown
Contributor

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

#[stable(feature = "core_impl_debug", since = "1.9.0")]
impl<'a,T:'a + fmt::Debug> fmt::DebugforIter<'a,T>{
fnfmt(&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
Copy Markdown
Member

@bors: r+ bc52bdc

Thanks!

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

Copy link
Copy Markdown
Contributor

@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
@sophiajtsophiajt mentioned this pull request Aug 17, 2016
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
@sophiajtsophiajt mentioned this pull request Aug 17, 2016
bors added a commit that referenced this pull request Aug 17, 2016
@bors
bors merged commit bc52bdc into rust-lang:masterAug 17, 2016
@frewsxcv
frewsxcv deleted the vec-into-iter-debug branch August 18, 2016 03:09
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

relnotesMarks 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

@frewsxcv@alexcrichton@eddyb@bors