diff options
author | David Sherret <dsherret@users.noreply.github.com> | 2022-03-29 13:33:00 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-29 13:33:00 -0400 |
commit | 03c71a8b4a5e4c451799144eb973402aafe22ea8 (patch) | |
tree | d27b0e11a376ee1559ca3c8abd0cf31f7b273490 /cli/lockfile.rs | |
parent | d983b577bc903f18028a99d0a40a17322ac80ffe (diff) |
chore: upgrade dprint-core to 0.54.1 (#14146)
Diffstat (limited to 'cli/lockfile.rs')
-rw-r--r-- | cli/lockfile.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/cli/lockfile.rs b/cli/lockfile.rs index ea1429829..33f5768fb 100644 --- a/cli/lockfile.rs +++ b/cli/lockfile.rs @@ -45,7 +45,10 @@ impl Lockfile { let j = json!(&self.map); let s = serde_json::to_string_pretty(&j).unwrap(); - let format_s = format_json(&s, &Default::default()).unwrap_or(s); + let format_s = format_json(&s, &Default::default()) + .ok() + .flatten() + .unwrap_or(s); let mut f = std::fs::OpenOptions::new() .write(true) .create(true) |