Skip to content

Commit bf8a837

Browse files
committed
fix(xenplatform): use cfg attributes for returning supported platforms
1 parent e0bbeb5 commit bf8a837

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

  • crates/xen/xenplatform/src

crates/xen/xenplatform/src/lib.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,10 @@ impl RuntimePlatformType {
5656
}
5757

5858
pub fn supported() -> RuntimePlatformType {
59-
if cfg!(target_arch = "x86_64") {
60-
RuntimePlatformType::Pv
61-
} else {
62-
RuntimePlatformType::Unsupported
63-
}
59+
#[cfg(target_arch = "x86_64")]
60+
return RuntimePlatformType::Pv;
61+
#[cfg(not(target_arch = "x86_64"))]
62+
return RuntimePlatformType::Unsupported;
6463
}
6564
}
6665

0 commit comments

Comments
 (0)