Skip to content

Commit

Permalink
uniffi::use_remote_type uses 'crate::name' form to specify types. (#2325
Browse files Browse the repository at this point in the history
)
  • Loading branch information
mhammond authored Nov 23, 2024
1 parent e0fd13f commit aa200a6
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion docs/manual/src/udl/remote_ext_types.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ Types that are remote and external require a `use_remote_type!` macro call.
If `crate_a` defines [IpAddr](https://doc.rust-lang.org/std/net/enum.IpAddr.html) as a remote type, then `crate_b` can use that type with the following Rust code:

```rust
uniffi::use_remote_type!(crate_a, IpAddr);
uniffi::use_remote_type!(crate_a::IpAddr);
```

## UDL
Expand Down
2 changes: 1 addition & 1 deletion fixtures/ext-types/lib/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ use uniffi_sublib::SubLibType;
use url::Url;

// Remote types require a macro call in the Rust source
uniffi::use_remote_type!(custom_types, Url);
uniffi::use_remote_type!(custom_types::Url);

pub struct CombinedType {
pub uoe: UniffiOneEnum,
Expand Down
2 changes: 1 addition & 1 deletion fixtures/ext-types/proc-macro-lib/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use uniffi_one::{
};
use url::Url;

uniffi::use_remote_type!(custom_types, Url);
uniffi::use_remote_type!(custom_types::Url);

#[derive(uniffi::Record)]
pub struct CombinedType {
Expand Down
2 changes: 1 addition & 1 deletion uniffi_macros/src/remote.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use syn::{

pub struct RemoteTypeArgs {
pub implementing_crate: Ident,
pub sep: Token![,],
pub sep: Token![::],
pub ty: Type,
}

Expand Down

0 comments on commit aa200a6

Please sign in to comment.