Skip to content

Commit 888601a

Browse files
nnethercoteLegNeato
authored andcommitted
Simplify NvvmArch::is_base_variant.
1 parent 2da444a commit 888601a

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

crates/nvvm/src/lib.rs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -540,12 +540,9 @@ impl NvvmArch {
540540

541541
/// Check if this architecture is a base variant (no suffix)
542542
pub fn is_base_variant(&self) -> bool {
543-
let feature = self.target_feature();
544-
// A base variant doesn't end with any letter suffix
545-
!feature
546-
.chars()
547-
.last()
548-
.is_some_and(|c| c.is_ascii_alphabetic())
543+
!self
544+
.target_feature()
545+
.ends_with(|c| char::is_ascii_alphabetic(&c))
549546
}
550547

551548
/// Check if this architecture is a family-specific variant (f suffix)

0 commit comments

Comments
 (0)