Skip to content

Commit ad39a59

Browse files
ndmitchellfacebook-github-bot
authored andcommitted
Avoid a clone
Reviewed By: yangdanny97 Differential Revision: D75456357 fbshipit-source-id: 9dc4de482255c5ab7a0164525e2a0805eef022a7
1 parent e54d34b commit ad39a59

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pyrefly/lib/alt/narrow.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -380,8 +380,8 @@ impl<'a, Ans: LookupAnswer> AnswersSolver<'a, Ans> {
380380
None,
381381
None,
382382
);
383-
if let Type::TypeGuard(box t) = ret {
384-
return t.clone();
383+
if let Type::TypeGuard(t) = ret {
384+
return *t;
385385
}
386386
}
387387
ty.clone()

0 commit comments

Comments
 (0)