Fix JSON formatter bug in Strategy pattern (#340)

Co-authored-by: Marco Ieni <11428655+MarcoIeni@users.noreply.github.com>
pull/336/head
Taras Burko 1 year ago committed by GitHub
parent be0f1b1db0
commit 7580985e8b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -73,7 +73,9 @@ impl Formatter for Json {
buf.push_str(&entry);
buf.push(',');
}
buf.pop(); // remove extra , at the end
if !data.is_empty() {
buf.pop(); // remove extra , at the end
}
buf.push(']');
}
}

Loading…
Cancel
Save