Skip to content

Commit

Permalink
Format: Fix lint test
Browse files Browse the repository at this point in the history
  • Loading branch information
raynelfss committed Jun 17, 2024
1 parent 00ce1cb commit 752e058
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions crates/accelerate/src/target_transpiler/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -949,7 +949,7 @@ impl Target {
// Rust native methods
impl Target {
/// Generate non global operations if missing
fn generate_non_global_op_names(&mut self, strict_direction: bool) -> &Vec<String> {
fn generate_non_global_op_names(&mut self, strict_direction: bool) -> &[String] {
let mut search_set: HashSet<Qargs, RandomState> = HashSet::default();
if strict_direction {
// Build search set
Expand Down Expand Up @@ -1012,13 +1012,13 @@ impl Target {
}

/// Get all non_global operation names.
pub fn get_non_global_op_names(&mut self, strict_direction: bool) -> Option<&Vec<String>> {
pub fn get_non_global_op_names(&mut self, strict_direction: bool) -> Option<&[String]> {
if strict_direction {
if self.non_global_strict_basis.is_some() {
return self.non_global_strict_basis.as_ref();
return self.non_global_strict_basis.as_deref();
}
} else if self.non_global_basis.is_some() {
return self.non_global_basis.as_ref();
return self.non_global_basis.as_deref();
}
return Some(self.generate_non_global_op_names(strict_direction));
}
Expand Down

0 comments on commit 752e058

Please sign in to comment.