diff --git a/src/lib.rs b/src/lib.rs index ca746de..429260c 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -372,7 +372,9 @@ impl<'a> TypeLayoutGraph<'a> { while i < self.tys.len() { // The first free slot can be used to insert the ty - let Some(cached_ty) = self.tys[i] else { + let cached_ty = if let Some(cached_ty) = self.tys[i] { + cached_ty + } else { self.tys[i] = Some(ty); return true;