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 2c21846 commit b97a106Copy full SHA for b97a106
1 file changed
src/repr/src/row/encode.rs
@@ -2126,14 +2126,12 @@ impl RowPacker<'_> {
2126
// Map keys must be unique and strictly ascending; iterating a
2127
// map that violates this trips a debug_assert. A crafted
2128
// proto can, so reject it as a decode error here instead.
2129
- if let Some(prev) = prev_key {
2130
- if e.key.as_str() <= prev {
2131
- return Err(format!(
2132
- "dict keys must be unique and in ascending order, \
2133
- but {:?} came after {:?}",
2134
- e.key, prev,
2135
- ));
2136
- }
+ if let Some(prev) = prev_key && e.key.as_str() <= prev {
+ return Err(format!(
+ "dict keys must be unique and in ascending order, \
+ but {:?} came after {:?}",
+ e.key, prev,
+ ));
2137
}
2138
prev_key = Some(e.key.as_str());
2139
row.push(Datum::from(e.key.as_str()));
0 commit comments