Skip to content

Commit 2647024

Browse files
committed
PR Fix: Clone first then move
1 parent cfd9163 commit 2647024

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

tokio-postgres/src/simple_query.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -101,10 +101,8 @@ impl Stream for SimpleQueryStream {
101101
.map_err(Error::parse)?
102102
.into();
103103

104-
*this.columns = Some(columns);
105-
Poll::Ready(Some(Ok(SimpleQueryMessage::RowDescription(
106-
this.columns.as_ref().unwrap().clone(),
107-
))))
104+
*this.columns = Some(columns.clone());
105+
Poll::Ready(Some(Ok(SimpleQueryMessage::RowDescription(columns))))
108106
}
109107
Message::DataRow(body) => {
110108
let row = match &this.columns {

0 commit comments

Comments
 (0)