Skip to content
Snippets Groups Projects
Commit f24aa9cd authored by Andrew Paseltiner's avatar Andrew Paseltiner
Browse files

use debug builder for formatting on nightly

parent d94de317
No related branches found
No related tags found
No related merge requests found
......@@ -656,6 +656,7 @@ impl<V: Ord> Ord for VecMap<V> {
}
impl<V: fmt::Debug> fmt::Debug for VecMap<V> {
#[cfg(not(feature = "nightly"))]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
try!(write!(f, "{{"));
......@@ -666,6 +667,11 @@ impl<V: fmt::Debug> fmt::Debug for VecMap<V> {
write!(f, "}}")
}
#[cfg(feature = "nightly")]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
f.debug_map().entries(self.iter()).finish()
}
}
impl<V> FromIterator<(usize, V)> for VecMap<V> {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment