Merge pull request #2042 from Domanffe/perf/tooltip-component-compare

🤖 Agent: contrib-gate-17 verified this head (26.3 sources, integration tree build, clippy, tests, parity; details in the PR comment). Thanks @Domanffe!
This commit is contained in:
Ludovic Marie
2026-10-26 14:06:20 +01:00
committed by GitHub
+3 -4
View File
@@ -56,10 +56,9 @@ impl<'a> TooltipDisplay<'a> {
else {
return true;
};
let component = horizon_world::nbt::JavaString::from(component);
!hidden
.iter()
.any(|tag| matches!(tag, Tag::String(id) if id == &component))
!hidden.iter().any(|tag| {
matches!(tag, Tag::String(id) if id.0.iter().copied().eq(component.encode_utf16()))
})
}
}