Skip to content

Commit 1df4982

Browse files
committed
Use order for field equality
1 parent e54b16b commit 1df4982

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

src/schema/common.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -226,10 +226,9 @@ pub struct Field {
226226
pub(crate) aliases: Option<Vec<String>>,
227227
}
228228

229-
// TODO do we also use order for equality?
230229
impl std::cmp::PartialEq for Field {
231230
fn eq(&self, other: &Self) -> bool {
232-
self.name == other.name && self.ty == other.ty
231+
self.name == other.name && self.ty == other.ty && self.order == other.order
233232
}
234233
}
235234

src/schema/parser.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -439,7 +439,7 @@ mod tests {
439439
"value",
440440
Variant::Long,
441441
Some(Value::Long(1)),
442-
Order::Ascending,
442+
Order::Descending,
443443
None,
444444
)
445445
.unwrap();

0 commit comments

Comments
 (0)