git.delta.rocks / jrsonnet / refs/commits / 7986fee6426f

difftreelog

style remove unused code

Yaroslav Bolyukin2023-08-12parent: #21712e7.patch.diff
in: master

1 file changed

modifiedcrates/jrsonnet-evaluator/src/obj.rsdiffbeforeafterboth
5858
59#[cfg(feature = "exp-preserve-order")]59#[cfg(feature = "exp-preserve-order")]
60mod ordering {60mod ordering {
61 use std::cmp::{Ordering, Reverse};61 use std::cmp::Reverse;
6262
63 use jrsonnet_gcmodule::Trace;63 use jrsonnet_gcmodule::Trace;
6464
84 pub fn new(depth: SuperDepth, index: FieldIndex) -> Self {84 pub fn new(depth: SuperDepth, index: FieldIndex) -> Self {
85 Self(Reverse(depth), index)85 Self(Reverse(depth), index)
86 }86 }
87 pub fn collide(self, other: Self) -> Self {
88 match self.0 .0.cmp(&other.0 .0) {
89 Ordering::Greater => self,
90 Ordering::Less => other,
91 Ordering::Equal => unreachable!("object can't have two fields with the same name"),
92 }
93 }
94 }87 }
95}88}
9689