mirror of
https://github.com/casey/just.git
synced 2024-11-22 10:26:26 +03:00
use discriminant
This commit is contained in:
parent
b64704592b
commit
0716e62761
@ -158,10 +158,7 @@ impl<'src> AttributeSet<'src> {
|
||||
}
|
||||
|
||||
pub(crate) fn contains(&self, target: AttributeDiscriminant) -> bool {
|
||||
self.0.iter().any(|attr| {
|
||||
let discriminant: AttributeDiscriminant = attr.into();
|
||||
discriminant == target
|
||||
})
|
||||
self.0.iter().any(|attr| attr.discriminant() == target)
|
||||
}
|
||||
|
||||
pub(crate) fn get(&self, discriminant: AttributeDiscriminant) -> Option<&Attribute<'src>> {
|
||||
|
Loading…
Reference in New Issue
Block a user