Remove unneeded prints, format

This commit is contained in:
Tomasz Wiśniewski 2022-09-07 18:05:55 +02:00
parent d1b3642923
commit d1a30df23d

View File

@ -47,7 +47,8 @@ impl Display for DocumentFormatError {
let trim_input_prefix_len = 50;
let trim_input_suffix_len = 85;
if serde_msg.len() > trim_input_prefix_len + trim_input_suffix_len + ellipsis.len()
if serde_msg.len()
> trim_input_prefix_len + trim_input_suffix_len + ellipsis.len()
{
serde_msg.replace_range(
trim_input_prefix_len..serde_msg.len() - trim_input_suffix_len,
@ -143,14 +144,9 @@ pub fn read_json(input: impl Read, writer: impl Write + Seek) -> Result<usize> {
let content: ArrayOrSingleObject = serde_json::from_reader(reader)
.map_err(Error::Json)
.map_err(|e| {
println!("Błąd o taki: {:#?}", e);
(PayloadType::Json, e)
})?;
.map_err(|e| (PayloadType::Json, e))?;
println!("content o taki: {:#?}", content);
for object in content.inner.map_right(|o| vec![o]).into_inner() {
println!("{:#?}", object);
builder
.append_json_object(&object)
.map_err(Into::into)
@ -158,8 +154,6 @@ pub fn read_json(input: impl Read, writer: impl Write + Seek) -> Result<usize> {
}
let count = builder.documents_count();
println!("{count}");
let _ = builder
.into_inner()
.map_err(Into::into)