We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5dd09ce commit 4a9ca42Copy full SHA for 4a9ca42
src/lib.rs
@@ -1666,11 +1666,13 @@ impl<'a> PostgresCopyInStatement<'a> {
1666
}
1667
1668
1669
+ let mut data = buf.unwrap();
1670
try_pg_desync!(conn, conn.stream.write_message(
1671
&CopyData {
- data: buf.unwrap()[]
1672
+ data: data[]
1673
}));
- buf = MemWriter::new();
1674
+ data.clear();
1675
+ buf = MemWriter::from_vec(data);
1676
1677
1678
let _ = buf.write_be_i16(-1);
0 commit comments