@@ -273,11 +273,10 @@ impl<'t, I: Interner> Unifier<'t, I> {
273
273
fn unify_lifetime_lifetime ( & mut self , a : & Lifetime < I > , b : & Lifetime < I > ) -> Fallible < ( ) > {
274
274
let interner = self . interner ;
275
275
276
- if let Some ( n_a) = self . table . normalize_lifetime_shallow ( interner, a) {
277
- return self . unify_lifetime_lifetime ( & n_a, b) ;
278
- } else if let Some ( n_b) = self . table . normalize_lifetime_shallow ( interner, b) {
279
- return self . unify_lifetime_lifetime ( a, & n_b) ;
280
- }
276
+ let n_a = self . table . normalize_lifetime_shallow ( interner, a) ;
277
+ let n_b = self . table . normalize_lifetime_shallow ( interner, b) ;
278
+ let a = n_a. as_ref ( ) . unwrap_or ( a) ;
279
+ let b = n_b. as_ref ( ) . unwrap_or ( b) ;
281
280
282
281
debug_heading ! ( "unify_lifetime_lifetime({:?}, {:?})" , a, b) ;
283
282
@@ -337,11 +336,10 @@ impl<'t, I: Interner> Unifier<'t, I> {
337
336
fn unify_const_const < ' a > ( & mut self , a : & ' a Const < I > , b : & ' a Const < I > ) -> Fallible < ( ) > {
338
337
let interner = self . interner ;
339
338
340
- if let Some ( n_a) = self . table . normalize_const_shallow ( interner, a) {
341
- return self . unify_const_const ( & n_a, b) ;
342
- } else if let Some ( n_b) = self . table . normalize_const_shallow ( interner, b) {
343
- return self . unify_const_const ( a, & n_b) ;
344
- }
339
+ let n_a = self . table . normalize_const_shallow ( interner, a) ;
340
+ let n_b = self . table . normalize_const_shallow ( interner, b) ;
341
+ let a = n_a. as_ref ( ) . unwrap_or ( a) ;
342
+ let b = n_b. as_ref ( ) . unwrap_or ( b) ;
345
343
346
344
debug_heading ! (
347
345
"unify_const_const(a={:?}\
0 commit comments