Skip to content

Commit 9d92214

Browse files
committed
Simplify NvvmArch::fmt.
1 parent 98a8b2b commit 9d92214

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
@@ -328,15 +328,7 @@ pub enum NvvmArch {
328328

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

0 commit comments

Comments
 (0)