change the api

This commit is contained in:
nora 2021-08-18 19:16:16 +02:00
parent 376a9c53bc
commit 426fb16d7e
5 changed files with 43 additions and 20 deletions

View file

@ -1,10 +1,10 @@
use criterion::{criterion_group, criterion_main, Criterion};
use jsonformat::format_json;
use jsonformat::{format_json, Indentation};
use std::{fs, io};
/// You need a json file called massive.json in your project root
fn format_massive_json(file: &str) -> io::Result<String> {
Ok(format_json(&file, None))
Ok(format_json(&file, Indentation::Default))
}
fn criterion_benchmark(c: &mut Criterion) {