format_and_print_result_full,
default_table_format_options,
},
+ router::ReturnType,
};
use proxmox_backup::backup::{
let crypt_config = match keyfile {
None => None,
Some(path) => {
- let (key, _) = load_and_decrypt_key(&path, &crate::key::get_encryption_key_password)?;
+ let (key, _, _) = load_and_decrypt_key(&path, &crate::key::get_encryption_key_password)?;
let crypt_config = CryptConfig::new(key)?;
Some(Arc::new(crypt_config))
}
) -> Result<(), Error> {
let mut data = serde_json::to_value(benchmark_result)?;
- let schema = &BenchmarkResult::API_SCHEMA;
+ let return_type = ReturnType::new(false, &BenchmarkResult::API_SCHEMA);
let render_speed = |value: &Value, _record: &Value| -> Result<String, Error> {
match value["speed"].as_f64() {
.right_align(false).renderer(render_speed));
- format_and_print_result_full(&mut data, schema, output_format, &options);
+ format_and_print_result_full(&mut data, &return_type, output_format, &options);
Ok(())
}