-
Type: Improvement
-
Resolution: Fixed
-
Priority: Unknown
-
Affects Version/s: 1.5.2
-
Component/s: None
-
None
In Connection.CompressWireMessage() we currently copy src into dst when using no compression:
if c.connection.compressor == wiremessage.CompressorNoOp { return append(dst, src...), nil }
Can we just set dst = src? I made this change and tested with mongorestore and it seemed to work fine, but I'm wondering if the underlying array can be mutated through dst at a later point which would cause problems for code still using src.