-
-
Save Gisleburt/ec443278c597623b0fef5c9d55dfacd1 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.0.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