pw_stream: Make MemoryWriter::data() non-const

Allows mutable access to a MemoryWriter's underlying buffer.

No-Docs-Update-Reason: Changing a data() accessor to non-const.
Change-Id: I02a1c21e670ba63f6de98441a851eddc03095cf5
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/45001
Reviewed-by: Wyatt Hepler <hepler@google.com>
Commit-Queue: Auto-Submit <auto-submit@pigweed.google.com.iam.gserviceaccount.com>
Pigweed-Auto-Submit: Armando Montanez <amontanez@google.com>
diff --git a/pw_stream/public/pw_stream/memory_stream.h b/pw_stream/public/pw_stream/memory_stream.h
index 84d9f5d..1ccf9ab 100644
--- a/pw_stream/public/pw_stream/memory_stream.h
+++ b/pw_stream/public/pw_stream/memory_stream.h
@@ -35,6 +35,7 @@
 
   ConstByteSpan WrittenData() const { return dest_.first(bytes_written_); }
 
+  std::byte* data() { return dest_.data(); }
   const std::byte* data() const { return dest_.data(); }
 
  private: