From 36c4fa6ab4894fce3926db40436b2e06bac16c4b Mon Sep 17 00:00:00 2001 From: Nik Revenco Date: Sat, 12 Jul 2025 14:24:38 +0100 Subject: [PATCH] fix: `map_or_else` has both arguments as closures --- runtime/queries/rust/highlights.scm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/runtime/queries/rust/highlights.scm b/runtime/queries/rust/highlights.scm index 5fd0756ae..de59c9321 100644 --- a/runtime/queries/rust/highlights.scm +++ b/runtime/queries/rust/highlights.scm @@ -363,6 +363,8 @@ ; methods on `Option` "and_then" "is_some_and" "is_none_or" "unwrap_or_else" "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 "map_err" "inspect_err" @@ -430,9 +432,9 @@ (arguments ; first argument is ignored . - _ - . ; second argument is @function + (_) + . (identifier) @function) (#any-of? @_method_name ; methods on `Option`