From 7986fee6426fc58fe69e58187a97f792a22352eb Mon Sep 17 00:00:00 2001 From: Yaroslav Bolyukin Date: Sat, 12 Aug 2023 19:49:42 +0000 Subject: [PATCH] style: remove unused code --- --- a/crates/jrsonnet-evaluator/src/obj.rs +++ b/crates/jrsonnet-evaluator/src/obj.rs @@ -58,7 +58,7 @@ #[cfg(feature = "exp-preserve-order")] mod ordering { - use std::cmp::{Ordering, Reverse}; + use std::cmp::Reverse; use jrsonnet_gcmodule::Trace; @@ -83,13 +83,6 @@ impl FieldSortKey { pub fn new(depth: SuperDepth, index: FieldIndex) -> Self { Self(Reverse(depth), index) - } - pub fn collide(self, other: Self) -> Self { - match self.0 .0.cmp(&other.0 .0) { - Ordering::Greater => self, - Ordering::Less => other, - Ordering::Equal => unreachable!("object can't have two fields with the same name"), - } } } } -- gitstuff