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 { impl ValueStream {
pub fn into_string(self) -> String { pub fn into_string(self) -> String {
self.map(|x: Value| x.into_string()) format!(
.collect::<Vec<String>>() "[{}]",
.join("\n") self.map(|x: Value| x.into_string())
.collect::<Vec<String>>()
.join(", ")
)
} }
pub fn from_stream(input: impl Iterator<Item = Value> + 'static) -> ValueStream { pub fn from_stream(input: impl Iterator<Item = Value> + 'static) -> ValueStream {