Skip to content

Commit b528cb7

Browse files
lolbinarycatCentri3
andcommitted
make comment more clear
Co-authored-by: Catherine Flores <catherine.3.flores@gmail.com>
1 parent 2ccce8d commit b528cb7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clippy_lints/src/and_then_then_some.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ impl<'tcx> LateLintPass<'tcx> for AndThenThenSome {
5353
}
5454
}
5555

56-
// `|v| X.then_some(v)` -> Some((span"|v|", X))
56+
// This function returns the span of the closure arguments and the receiver of `then_some` (usually `bool`) if the expression passed is a closure whose single expression is a call to `then_some`.
5757
fn then_some_closure_arg<'tcx>(cx: &LateContext<'tcx>, expr: &Expr<'tcx>) -> Option<(Span, &'tcx Expr<'tcx>)> {
5858
match expr.kind {
5959
ExprKind::Closure(Closure {

0 commit comments

Comments
 (0)