Skip to content

Commit

Permalink
refactor: Remove redundant validation
Browse files Browse the repository at this point in the history
Only extension validation is needed
  • Loading branch information
croyzor committed May 8, 2024
1 parent 39bc214 commit 23d8aa5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion hugr/src/hugr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ pub mod serialize;
pub mod validate;
pub mod views;

#[cfg(feature = "extension_inference")]
use std::collections::HashMap;
use std::collections::VecDeque;
use std::iter;

Expand Down Expand Up @@ -198,7 +200,8 @@ impl Hugr {
resolve_extension_ops(self, extension_registry)?;
self.validate_no_extensions(extension_registry)?;
self.infer_extensions()?;
self.validate(extension_registry)?;
#[cfg(feature = "infer_extensions")]
self.validate_extensions(HashMap::new())?;
Ok(())
}

Expand Down

0 comments on commit 23d8aa5

Please sign in to comment.