fix: `map_or_else` has both arguments as closures

pull/13932/head
Nik Revenco 2025-07-12 14:24:38 +01:00
parent 9de1c7213b
commit 36c4fa6ab4
1 changed files with 4 additions and 2 deletions

View File

@ -363,6 +363,8 @@
; methods on `Option` ; methods on `Option`
"and_then" "is_some_and" "is_none_or" "unwrap_or_else" "and_then" "is_some_and" "is_none_or" "unwrap_or_else"
"ok_or_else" "or_else" "get_or_insert_with" "take_if" "ok_or_else" "or_else" "get_or_insert_with" "take_if"
"map_or_else" ; NOTE: both arguments are closures, so it is here and also in the block to
; highlight the 2nd argument
; methods on `Result ; methods on `Result
"map_err" "inspect_err" "map_err" "inspect_err"
@ -430,9 +432,9 @@
(arguments (arguments
; first argument is ignored ; first argument is ignored
. .
_
.
; second argument is @function ; second argument is @function
(_)
.
(identifier) @function) (identifier) @function)
(#any-of? @_method_name (#any-of? @_method_name
; methods on `Option` ; methods on `Option`