Skip to content

Commit cc450b2

Browse files
committed
Simplify NvvmArch::fmt.
1 parent 8681ac5 commit cc450b2

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

crates/nvvm/src/lib.rs

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -325,15 +325,7 @@ pub enum NvvmArch {
325325

326326
impl Display for NvvmArch {
327327
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
328-
let raw = format!("{self:?}").to_ascii_lowercase();
329-
// Handle architectures with suffixes (e.g., Compute90a -> compute_90a)
330-
if let Some(pos) = raw.find(|c: char| c.is_ascii_digit()) {
331-
let (prefix, rest) = raw.split_at(pos);
332-
write!(f, "{prefix}_{rest}")
333-
} else {
334-
// Fallback for unexpected format
335-
f.write_str(&raw)
336-
}
328+
f.write_str(self.target_feature())
337329
}
338330
}
339331

0 commit comments

Comments
 (0)