use std::{fs::File, io::Write}; use crate::backup::Backup; pub fn save_index(backup: Backup) { let mut f = File::create("./index.json").unwrap(); f.write_all(&serde_json::to_vec(&backup).unwrap()).unwrap(); }