summaryrefslogblamecommitdiff
path: root/src/storage.rs
blob: b9e8de94fd911ac854ebc07926902d462ab55218 (plain) (tree)
1
2
3
4
5
6
7
8







                                                                
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();
}