File tree 1 file changed +8
-8
lines changed
1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -251,23 +251,23 @@ impl Tag {
251
251
}
252
252
253
253
/// Is this an application tag?
254
- pub fn is_application ( self ) -> bool {
255
- self . class ( ) == Class :: Application
254
+ pub const fn is_application ( self ) -> bool {
255
+ matches ! ( self . class( ) , Class :: Application )
256
256
}
257
257
258
258
/// Is this a context-specific tag?
259
- pub fn is_context_specific ( self ) -> bool {
260
- self . class ( ) == Class :: ContextSpecific
259
+ pub const fn is_context_specific ( self ) -> bool {
260
+ matches ! ( self . class( ) , Class :: ContextSpecific )
261
261
}
262
262
263
263
/// Is this a private tag?
264
- pub fn is_private ( self ) -> bool {
265
- self . class ( ) == Class :: Private
264
+ pub const fn is_private ( self ) -> bool {
265
+ matches ! ( self . class( ) , Class :: Private )
266
266
}
267
267
268
268
/// Is this a universal tag?
269
- pub fn is_universal ( self ) -> bool {
270
- self . class ( ) == Class :: Universal
269
+ pub const fn is_universal ( self ) -> bool {
270
+ matches ! ( self . class( ) , Class :: Universal )
271
271
}
272
272
273
273
/// Create an [`Error`] for an invalid [`Length`].
You can’t perform that action at this time.
0 commit comments