Details
-
Improvement
-
Resolution: Fixed
-
Unknown
-
1.5.2
-
None
-
None
Description
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.