From eb9c75ec1779db7ca50bf8e1abc214171c73ee7a Mon Sep 17 00:00:00 2001 From: David Shin Date: Thu, 25 Apr 2024 02:23:10 +0000 Subject: [PATCH] Bug 1892727: Ensure `KleeneValue`'s `any_*` functions are inlined. r=firefox-style-system-reviewers,emilio Differential Revision: https://phabricator.services.mozilla.com/D208513 --- servo/components/selectors/kleene_value.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/servo/components/selectors/kleene_value.rs b/servo/components/selectors/kleene_value.rs index 58141c115636..96d6457e600a 100644 --- a/servo/components/selectors/kleene_value.rs +++ b/servo/components/selectors/kleene_value.rs @@ -38,6 +38,7 @@ impl KleeneValue { /// Return true if any result of f() is true. Otherwise, return the strongest value seen. /// Returns false if empty, like that of `Iterator`. + #[inline(always)] pub fn any( iter: impl Iterator, f: impl FnMut(T) -> Self, @@ -47,6 +48,7 @@ impl KleeneValue { /// Return false if any results of f() is false. Otherwise, return the strongest value seen. /// Returns true if empty, opposite of `Iterator`. + #[inline(always)] pub fn any_false( iter: impl Iterator, f: impl FnMut(T) -> Self, @@ -54,6 +56,7 @@ impl KleeneValue { Self::any_value(iter, Self::False, Self::True, f) } + #[inline(always)] fn any_value( iter: impl Iterator, value: Self,