mirror of
https://framagit.org/ppom/reaction
synced 2026-03-14 20:55:47 +01:00
fix previous-previous commit for import-rust-db
This commit is contained in:
parent
79677cf327
commit
db22bc087d
1 changed files with 3 additions and 3 deletions
|
|
@ -47,13 +47,13 @@ fn lil_main() -> Result<(), E> {
|
|||
std::fs::rename(format!("{DB}{NORMAL}"), format!("{DB}{OLD}"))?;
|
||||
std::fs::rename(format!("{FLUSH}{NORMAL}"), format!("{FLUSH}{OLD}"))?;
|
||||
|
||||
import(format!("{DB}{EXPORT}"), format!("{DB}{NORMAL}"))?;
|
||||
import(format!("{FLUSH}{EXPORT}"), format!("{FLUSH}{NORMAL}"))?;
|
||||
import(&format!("{DB}{EXPORT}"), &format!("{DB}{NORMAL}"))?;
|
||||
import(&format!("{FLUSH}{EXPORT}"), &format!("{FLUSH}{NORMAL}"))?;
|
||||
Ok(())
|
||||
}
|
||||
|
||||
fn import(json_path: &str, write_path: &str) -> Result<(), E> {
|
||||
let json_file = BufReader::new(File::open(json_path.clone())?);
|
||||
let json_file = BufReader::new(File::open(json_path)?);
|
||||
let mut write_file = BufWriter::new(File::create(write_path)?);
|
||||
let bin = bincode_options();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue