forked from M-Labs/nac3
1
0
Fork 0

nac3core: fix clippy warning

This commit is contained in:
ychenfo 2021-11-22 14:55:39 +08:00
parent c6f75c8bde
commit 664e02cec4
1 changed files with 2 additions and 1 deletions

View File

@ -282,7 +282,8 @@ pub fn gen_func<'ctx, G: CodeGenerator + ?Sized>(
let b = task.store.to_unifier_type(&mut unifier, &primitives, *b, &mut cache);
unifier.unify(*a, b).or_else(|err| {
if matches!(&*unifier.get_ty(*a), TypeEnum::TRigidVar { .. }) {
Ok(unifier.replace_rigid_var(*a, b))
unifier.replace_rigid_var(*a, b);
Ok(())
} else {
Err(err)
}