mirror of
https://github.com/nushell/nushell
synced 2024-11-10 23:24:14 +00:00
change line format for test
This commit is contained in:
parent
b4977f1515
commit
767d822cbf
1 changed files with 6 additions and 3 deletions
|
@ -6,9 +6,12 @@ pub struct ValueStream(pub Rc<RefCell<dyn Iterator<Item = Value>>>);
|
|||
|
||||
impl ValueStream {
|
||||
pub fn into_string(self) -> String {
|
||||
self.map(|x: Value| x.into_string())
|
||||
.collect::<Vec<String>>()
|
||||
.join("\n")
|
||||
format!(
|
||||
"[{}]",
|
||||
self.map(|x: Value| x.into_string())
|
||||
.collect::<Vec<String>>()
|
||||
.join(", ")
|
||||
)
|
||||
}
|
||||
|
||||
pub fn from_stream(input: impl Iterator<Item = Value> + 'static) -> ValueStream {
|
||||
|
|
Loading…
Reference in a new issue