change line format for test

This commit is contained in:
Fernando Herrera 2021-09-24 13:20:50 +01:00
parent b4977f1515
commit 767d822cbf

View File

@ -6,9 +6,12 @@ pub struct ValueStream(pub Rc<RefCell<dyn Iterator<Item = Value>>>);
impl ValueStream {
pub fn into_string(self) -> String {
format!(
"[{}]",
self.map(|x: Value| x.into_string())
.collect::<Vec<String>>()
.join("\n")
.join(", ")
)
}
pub fn from_stream(input: impl Iterator<Item = Value> + 'static) -> ValueStream {