Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix StringStreamDataWriter.toString to not consume buffer (#384)
During debugging, it was confusing to see some contents of the buffer when pausing in the debugger before an assertion, but then seeing the assertion fail. It didn't make sense why the assertion fails - the value of the buffer was as expected. It turned out that the debugger called `toString()`, consuming the buffer, and leaving an empty buffer when performing the assertion. The solution here is to just `peek()` the buffer in `toString()`, not consume it.
- Loading branch information