(node: Node<'_>, context: &mut Context<'_>)
| 111 | } |
| 112 | |
| 113 | fn success(node: Node<'_>, context: &mut Context<'_>) -> Result<bool, &'static str> { |
| 114 | if node.kind() != "call_expression" { |
| 115 | return Ok(false); |
| 116 | } |
| 117 | let Some(function) = node.child_by_field_name("function") else { |
| 118 | return Ok(false); |
| 119 | }; |
| 120 | Ok(matches!( |
| 121 | context.compact(function)?.as_str(), |
| 122 | "Ok" | "Result::Ok" | "std::result::Result::Ok" | "core::result::Result::Ok" |
| 123 | )) |
| 124 | } |
| 125 | |
| 126 | fn optional_not_found( |
| 127 | pattern: Node<'_>, |