src/backup/manifest.rs: cleanup - avoid recursive call to write_canonical_json

This commit is contained in:
Dietmar Maurer 2020-07-27 08:48:11 +02:00
parent e6b599aa6c
commit 0bf7ba6c92
1 changed files with 1 additions and 1 deletions

View File

@ -160,7 +160,7 @@ impl BackupManifest {
keys.sort(); keys.sort();
let mut iter = keys.into_iter(); let mut iter = keys.into_iter();
if let Some(key) = iter.next() { if let Some(key) = iter.next() {
Self::write_canonical_json(&key.into(), output)?; serde_json::to_writer(output as &mut dyn std::io::Write, &key)?;
output.push(b':'); output.push(b':');
Self::write_canonical_json(&map[key], output)?; Self::write_canonical_json(&map[key], output)?;
for key in iter { for key in iter {