Format code

Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
This commit is contained in:
Matthias Beyer 2018-11-06 19:02:57 +01:00
parent 582fd10acb
commit 0e4cb59772

View file

@ -148,8 +148,7 @@ impl FileAbstraction for FSFileAbstraction {
/// FileAbstraction::fill implementation that consumes the Drain and writes everything to the /// FileAbstraction::fill implementation that consumes the Drain and writes everything to the
/// filesystem /// filesystem
fn fill(&mut self, mut d: Drain) -> Result<()> { fn fill(&mut self, mut d: Drain) -> Result<()> {
d.iter() d.iter().fold(Ok(()), |acc, (path, element)| {
.fold(Ok(()), |acc, (path, element)| {
acc.and_then(|_| self.new_instance(path).write_file_content(&element)) acc.and_then(|_| self.new_instance(path).write_file_content(&element))
}) })
} }