We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 99ebda2 commit 8a0eab0Copy full SHA for 8a0eab0
1 file changed
postgres/src/lib.rs
@@ -959,13 +959,9 @@ impl InnerConnection {
959
columns = Some(self.parse_cols(Some(body))?);
960
}
961
backend::Message::CommandComplete(_) => {
962
- result.push(
963
- TextRows::new(
964
- // TODO is it safe to unwrap here?
965
- columns.take().unwrap(),
966
- mem::replace(&mut rows, Vec::new())
967
- )
968
- );
+ if let Some(cols) = columns.take() {
+ result.push(TextRows::new(cols, mem::replace(&mut rows, Vec::new())));
+ }
969
970
_ => {}
971
0 commit comments