Skip to content

Commit

Permalink
Remove unnecessary destructuring
Browse files Browse the repository at this point in the history
  • Loading branch information
antoniosarosi committed Dec 2, 2024
1 parent 9b2e0da commit 0bcb002
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions engine/baml-lib/baml-core/src/ir/ir_helpers/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -108,10 +108,8 @@ impl IRHelper for IntermediateRepr {

fn find_function<'a>(&'a self, function_name: &str) -> Result<FunctionWalker<'a>> {
match self.walk_functions().find(|f| f.name() == function_name) {
Some(f) => {
let repr::Function { .. } = f.item.elem;
Ok(f)
}
Some(f) => Ok(f),

None => {
// Get best match.
let functions = self.walk_functions().map(|f| f.name()).collect::<Vec<_>>();
Expand Down

0 comments on commit 0bcb002

Please sign in to comment.