Skip to content

Commit

Permalink
Use `if cfg!(..) instead of #[cfg(...)]
Browse files Browse the repository at this point in the history
  • Loading branch information
aborgna-q committed Dec 9, 2024
1 parent f43f375 commit 759c8a7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions hugr-core/src/hugr/validate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,9 @@ impl Hugr {
/// variables (see github issue #457)
pub fn validate(&self) -> Result<(), ValidationError> {
self.validate_no_extensions()?;
#[cfg(feature = "extension_inference")]
self.validate_extensions()?;
if cfg!(feature = "extension_inference") {
self.validate_extensions()?;
}
Ok(())
}

Expand Down

0 comments on commit 759c8a7

Please sign in to comment.