Skip to content

Instantly share code, notes, and snippets.

@Gisleburt
Last active June 10, 2019 12:15
Show Gist options
  • Save Gisleburt/e36b589bd3a0dc75598377b4dc52c8b1 to your computer and use it in GitHub Desktop.
Save Gisleburt/e36b589bd3a0dc75598377b4dc52c8b1 to your computer and use it in GitHub Desktop.
impl fmt::Display for Vec<Album> {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
self.iter().fold(Ok(()), |result, album| {
result.and_then(|_| writeln!(f, "{}", album))
})
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment