Created
July 15, 2018 17:51
-
-
Save ykhrustalev/dbb12a6982fb78ff55e03fece6835b18 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use std::iter::FromIterator; | |
impl std::fmt::Display for heap::ArrayHeap<i32> { | |
fn fmt(&self, f: &mut std::fmt::Formatter) -> Result<(), std::fmt::Error> { | |
let x = std::vec::Vec::from_iter(self.items().iter().map(|x| x.to_string())).join(","); | |
std::fmt::Display::fmt(&x, f) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment