Last active
June 10, 2019 12:27
-
-
Save Gisleburt/b6e5dbbc1308c998586ca687c64157c5 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
impl fmt::Display for Albums { | |
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