From 634972d17461c25e882df417bfbce5ba5fb60694 Mon Sep 17 00:00:00 2001 From: Andy Waite Date: Mon, 27 May 2024 12:15:14 -0400 Subject: [PATCH] Remove unnecessary casts --- lib/ruby_indexer/lib/ruby_indexer/index.rb | 10 ++++------ test/fixtures/prism | 2 +- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/lib/ruby_indexer/lib/ruby_indexer/index.rb b/lib/ruby_indexer/lib/ruby_indexer/index.rb index 363a376a2..eaf23cb94 100644 --- a/lib/ruby_indexer/lib/ruby_indexer/index.rb +++ b/lib/ruby_indexer/lib/ruby_indexer/index.rb @@ -249,12 +249,10 @@ def resolve_method(method_name, receiver_name) return unless owner_entries && method_entries owner_name = T.must(owner_entries.first).name - T.cast( - method_entries.grep(Entry::Member).select do |entry| - T.cast(entry, Entry::Member).owner&.name == owner_name - end, - T::Array[Entry::Member], - ) + + method_entries.grep(Entry::Member).select do |entry| + entry.owner&.name == owner_name + end end private diff --git a/test/fixtures/prism b/test/fixtures/prism index 4f455dcdc..b6aa0f22b 160000 --- a/test/fixtures/prism +++ b/test/fixtures/prism @@ -1 +1 @@ -Subproject commit 4f455dcdc6c78e41f3ed8905f4cc1cdff7765fbd +Subproject commit b6aa0f22be2fddef68cb8c635d090591133e3260