Skip to content

Commit de25d0d

Browse files
committed
Clean up TypeckResults::extract_binding_mode
- Remove the `Option` from the result type, as `None` is never returned. - Document the difference from the `BindingMode` in `PatKind::Binding`.
1 parent 17bda0c commit de25d0d

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

clippy_utils/src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1095,7 +1095,6 @@ pub fn capture_local_usage(cx: &LateContext<'_>, e: &Expr<'_>) -> CaptureKind {
10951095
pat.each_binding_or_first(&mut |_, id, span, _| match cx
10961096
.typeck_results()
10971097
.extract_binding_mode(cx.sess(), id, span)
1098-
.unwrap()
10991098
.0
11001099
{
11011100
ByRef::No if !is_copy(cx, cx.typeck_results().node_type(id)) => {

0 commit comments

Comments
 (0)