We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
NvvmArch::fmt
1 parent 2891f7d commit 49a7321Copy full SHA for 49a7321
crates/nvvm/src/lib.rs
@@ -339,15 +339,7 @@ pub enum NvvmArch {
339
340
impl Display for NvvmArch {
341
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
342
- let raw = format!("{self:?}").to_ascii_lowercase();
343
- // Handle architectures with suffixes (e.g., Compute90a -> compute_90a)
344
- if let Some(pos) = raw.find(|c: char| c.is_ascii_digit()) {
345
- let (prefix, rest) = raw.split_at(pos);
346
- write!(f, "{prefix}_{rest}")
347
- } else {
348
- // Fallback for unexpected format
349
- f.write_str(&raw)
350
- }
+ f.write_str(&self.target_feature())
351
}
352
353
0 commit comments