Skip to content

Commit 59b4094

Browse files
committed
Documented new lint helper function
1 parent 261dd1c commit 59b4094

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

clippy_lints/src/option_if_let_else.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ declare_clippy_lint! {
7070

7171
declare_lint_pass!(OptionIfLetElse => [OPTION_IF_LET_ELSE]);
7272

73+
/// Returns true iff the given expression is the result of calling Result::ok
7374
fn is_result_ok(cx: &LateContext<'_, '_>, expr: &'_ Expr<'_>) -> bool {
7475
if_chain! {
7576
if let ExprKind::MethodCall(ref path, _, &[ref receiver]) = &expr.kind;

0 commit comments

Comments
 (0)