Remove unnecessary gates.

This commit is contained in:
Stephen Chung 2023-06-27 16:53:21 +08:00
parent 172bc14996
commit 541844e1e1

View File

@ -246,10 +246,7 @@ impl Dynamic {
#[inline(always)]
#[must_use]
pub const fn is_shared(&self) -> bool {
#[cfg(not(feature = "no_closure"))]
return matches!(self.0, Union::Shared(..));
#[cfg(feature = "no_closure")]
return false;
matches!(self.0, Union::Shared(..))
}
/// Is the value held by this [`Dynamic`] a particular type?
///