Skip to content

Commit

Permalink
Merge pull request #3 from Sajjon/custom-type-rework
Browse files Browse the repository at this point in the history
Allow 'External' errors from crate X to be used in crate Y
  • Loading branch information
bendk authored May 23, 2024
2 parents 4b65c37 + d2886a5 commit bd33c25
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion uniffi_bindgen/src/interface/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1118,7 +1118,9 @@ fn throws_name(throws: &Option<Type>) -> Option<&str> {
// Type has no `name()` method, just `canonical_name()` which isn't what we want.
match throws {
None => None,
Some(Type::Enum { name, .. }) | Some(Type::Object { name, .. }) => Some(name),
Some(Type::Enum { name, .. })
| Some(Type::Object { name, .. })
| Some(Type::External { name, .. }) => Some(name),
_ => panic!("unknown throw type: {throws:?}"),
}
}
Expand Down

0 comments on commit bd33c25

Please sign in to comment.