Skip to content

Commit

Permalink
simplify code
Browse files Browse the repository at this point in the history
Signed-off-by: Joel Dice <[email protected]>
  • Loading branch information
dicej committed Mar 11, 2024
1 parent 0c0d5b0 commit 1a1e399
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions crates/rust/src/interface.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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!()
Expand Down Expand Up @@ -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!()
Expand Down

0 comments on commit 1a1e399

Please sign in to comment.