mirror of
https://github.com/nushell/nushell
synced 2025-01-10 12:19:14 +00:00
17 lines
439 B
Rust
17 lines
439 B
Rust
|
use crate::prelude::*;
|
||
|
use crate::{EntriesListView, GenericView};
|
||
|
use futures::stream::{self, StreamExt};
|
||
|
use std::sync::{Arc, Mutex};
|
||
|
|
||
|
crate fn format(input: Vec<Value>, host: &mut dyn Host) {
|
||
|
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 {
|
||
|
println!("");
|
||
|
}
|
||
|
}
|
||
|
}
|