Skip to content

Commit

Permalink
Clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
jfecher committed Dec 4, 2024
1 parent 60acba6 commit af8ca01
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions compiler/noirc_evaluator/src/ssa/ir/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -191,11 +191,11 @@ impl Type {
}

/// Retrieves the array or slice type within this type, or panics if there is none.
pub(crate) fn into_contained_array(&self) -> &Type {
pub(crate) fn get_contained_array(&self) -> &Type {
match self {
Type::Numeric(_) | Type::Function => panic!("Expected an array type"),
Type::Array(_, _) | Type::Slice(_) => self,
Type::Reference(element) => element.into_contained_array(),
Type::Reference(element) => element.get_contained_array(),
}
}

Expand Down
8 changes: 4 additions & 4 deletions compiler/noirc_evaluator/src/ssa/ssa_gen/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -932,10 +932,10 @@ impl<'a> FunctionContext<'a> {
if element.contains_an_array() {
// If we haven't already seen this array type, the value may be possibly
// aliased, so issue an inc_rc for it.
if !seen_array_types.insert(element.into_contained_array().clone()) {
if self.builder.increment_array_reference_count(parameter) {
incremented.insert(parameter);
}
if !seen_array_types.insert(element.get_contained_array().clone())
&& self.builder.increment_array_reference_count(parameter)
{
incremented.insert(parameter);
}
}
}
Expand Down

0 comments on commit af8ca01

Please sign in to comment.