Skip to content

Commit 54d565f

Browse files
author
bors-servo
authored
Auto merge of #109 - thelearnerofcode:master, r=mbrubeck
Improved debug implementation. Before SmallVec would use "{:?}" style debug info no matter what the programmer specified. This pull request makes it much more inline with what Vec does by replacing the previous implementation with DebugList. See: [https://doc.rust-lang.org/std/fmt/struct.Formatter.html#method.debug_list](https://doc.rust-lang.org/std/fmt/struct.Formatter.html#method.debug_list) <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/rust-smallvec/109) <!-- Reviewable:end -->
2 parents a56ed6e + 7cd1aec commit 54d565f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1184,7 +1184,7 @@ impl<A: Array> Extend<A::Item> for SmallVec<A> {
11841184

11851185
impl<A: Array> fmt::Debug for SmallVec<A> where A::Item: fmt::Debug {
11861186
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1187-
write!(f, "{:?}", &**self)
1187+
f.debug_list().entries(self.iter()).finish()
11881188
}
11891189
}
11901190

0 commit comments

Comments
 (0)