Skip to content

Commit

Permalink
Move cfg!(target_feature) directly into is_*_feature_detected!() (rus…
Browse files Browse the repository at this point in the history
  • Loading branch information
Amanieu authored Apr 24, 2021
1 parent 2f0cfe9 commit 594e63b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions crates/std_detect/src/detect/macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ macro_rules! features {
macro_rules! $macro_name {
$(
($feature_lit) => {
$crate::detect::__is_feature_detected::$feature()
cfg!(target_feature = $feature_lit) ||
$crate::detect::__is_feature_detected::$feature()
};
)*
$(
Expand Down Expand Up @@ -94,8 +95,7 @@ macro_rules! features {
#[doc(hidden)]
#[$stability_attr]
pub fn $feature() -> bool {
cfg!(target_feature = $feature_lit) ||
$crate::detect::check_for($crate::detect::Feature::$feature)
$crate::detect::check_for($crate::detect::Feature::$feature)
}
)*
}
Expand Down

0 comments on commit 594e63b

Please sign in to comment.