Skip to content

Commit

Permalink
Allow 'External' errors from crate X to be used in crate Y
Browse files Browse the repository at this point in the history
  • Loading branch information
Sajjon authored and bendk committed May 23, 2024
1 parent 5ceb35e commit f4fae82
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 f4fae82

Please sign in to comment.