Skip to content

Commit a028f0c

Browse files
committed
fix panic in try_get
1 parent a2d0652 commit a028f0c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tokio-postgres/src/row.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ impl Row {
191191

192192
/// Get the raw bytes for the column at the given index.
193193
fn col_buffer(&self, idx: usize) -> Option<&[u8]> {
194-
let range = self.ranges[idx].to_owned()?;
194+
let range = self.ranges.get(idx)?.to_owned()?;
195195
Some(&self.body.buffer()[range])
196196
}
197197

0 commit comments

Comments
 (0)