From 1a1e399d4d336c33ff8976730528a14ab0318b64 Mon Sep 17 00:00:00 2001 From: Joel Dice Date: Mon, 11 Mar 2024 17:35:09 -0600 Subject: [PATCH] simplify code Signed-off-by: Joel Dice --- crates/rust/src/interface.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/rust/src/interface.rs b/crates/rust/src/interface.rs index fa1e781ef..2daf1a461 100644 --- a/crates/rust/src/interface.rs +++ b/crates/rust/src/interface.rs @@ -143,7 +143,7 @@ impl InterfaceGenerator<'_> { if let TypeDefKind::Result(Result_ { ok, .. }) = &self.resolve.types[*id].kind { - ok.map(|ok| Results::Anon(ok)) + ok.map(Results::Anon) .unwrap_or_else(|| Results::Named(Vec::new())) } else { unreachable!() @@ -384,7 +384,7 @@ impl InterfaceGenerator<'_> { if let TypeDefKind::Result(Result_ { ok, .. }) = &self.resolve.types[*id].kind { - ok.map(|ok| Results::Anon(ok)) + ok.map(Results::Anon) .unwrap_or_else(|| Results::Named(Vec::new())) } else { unreachable!()