Skip to content

Commit 470bf26

Browse files
committed
Optimize OrdWithEngines for TypeParameter.
1 parent 00ebc0d commit 470bf26

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

sway-core/src/type_system/ast_elements/type_parameter.rs

+5-8
Original file line numberDiff line numberDiff line change
@@ -109,14 +109,11 @@ impl OrdWithEngines for TypeParameter {
109109
initial_type_id: _,
110110
is_from_parent: _,
111111
} = other;
112-
ln.cmp(rn)
113-
.then_with(|| {
114-
ctx.engines()
115-
.te()
116-
.get(*lti)
117-
.cmp(&ctx.engines().te().get(*rti), ctx)
118-
})
119-
.then_with(|| ltc.cmp(rtc, ctx))
112+
ctx.engines()
113+
.te()
114+
.get(*lti)
115+
.cmp(&ctx.engines().te().get(*rti), ctx)
116+
.then_with(|| ln.cmp(rn).then_with(|| ltc.cmp(rtc, ctx)))
120117
}
121118
}
122119

0 commit comments

Comments
 (0)