Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions der/src/tag.rs
Original file line number Diff line number Diff line change
Expand Up @@ -251,23 +251,23 @@ impl Tag {
}

/// Is this an application tag?
pub fn is_application(self) -> bool {
self.class() == Class::Application
pub const fn is_application(self) -> bool {
matches!(self.class(), Class::Application)
}

/// Is this a context-specific tag?
pub fn is_context_specific(self) -> bool {
self.class() == Class::ContextSpecific
pub const fn is_context_specific(self) -> bool {
matches!(self.class(), Class::ContextSpecific)
}

/// Is this a private tag?
pub fn is_private(self) -> bool {
self.class() == Class::Private
pub const fn is_private(self) -> bool {
matches!(self.class(), Class::Private)
}

/// Is this a universal tag?
pub fn is_universal(self) -> bool {
self.class() == Class::Universal
pub const fn is_universal(self) -> bool {
matches!(self.class(), Class::Universal)
}

/// Create an [`Error`] for an invalid [`Length`].
Expand Down