2019-05-24 19:35:22 +00:00
|
|
|
use crate::prelude::*;
|
2019-06-07 07:50:26 +00:00
|
|
|
use crate::{EntriesListView, GenericView, TreeView};
|
2019-05-24 19:35:22 +00:00
|
|
|
use futures::stream::{self, StreamExt};
|
|
|
|
use std::sync::{Arc, Mutex};
|
|
|
|
|
2019-08-29 11:08:28 +00:00
|
|
|
pub(crate) fn format(input: Vec<Value>, host: &mut dyn Host) {
|
2019-05-24 19:35:22 +00:00
|
|
|
let last = input.len() - 1;
|
|
|
|
for (i, item) in input.iter().enumerate() {
|
|
|
|
let view = GenericView::new(item);
|
|
|
|
crate::format::print_view(&view, &mut *host);
|
|
|
|
|
|
|
|
if last != i {
|
2019-11-04 15:47:03 +00:00
|
|
|
outln!("");
|
2019-05-24 19:35:22 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|