Advertisement
Guest User

Untitled

a guest
Feb 6th, 2025
134
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. if !args.dont_pretty_print {
  2. // Pretty print the final string to the specified file:
  3. fs::write(&args.target_file, json::stringify_pretty(target_diff, 4)).unwrap_or_else(
  4. |err| {
  5. panic!(
  6. "There was a problem when writing to the final file {}, {}",
  7. &args.target_file, err
  8. )
  9. },
  10. );
  11. } else {
  12. fs::write(&args.target_file, json::stringify(target_diff)).unwrap_or_else(|err| {
  13. panic!(
  14. "There was a problem when writing to the final file {}, {}",
  15. &args.target_file, err
  16. )
  17. });
  18. }
  19.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement