-
Notifications
You must be signed in to change notification settings - Fork 230
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added return handling to
FfiConverter
Added the `FfiConverter::lower_return` method. This is like `lower()` but specialized for scaffolding returns. This allows us to always use a single function to handle scaffolding calls, rather than `call_with_output` or `call_with_result` depending on if the return type is a `Result<>` or not. Having a single code-path for return handling simplifies the code generation, especially the macros. We no longer need to try to parse `Result<>` type names. This is especially useful for crates that type-alias their `Result<>` types. Updated `object_references.md` and removed example code that's no longer valid. Replaced it with higher-level descriptions of what's going on, hopefully this will stay not get out of date as quickly.
- Loading branch information
Showing
30 changed files
with
473 additions
and
534 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 7 additions & 7 deletions
14
fixtures/uitests/tests/ui/interface_cannot_use_mut_self.stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
error[E0308]: mismatched types | ||
--> $OUT_DIR[uniffi_uitests]/counter.uniffi.rs | ||
| | ||
| Ok(ref val) => val, | ||
| ^^^ types differ in mutability | ||
| | ||
= note: expected mutable reference `&mut Counter` | ||
found reference `&Arc<Counter>` | ||
--> $OUT_DIR[uniffi_uitests]/counter.uniffi.rs | ||
| | ||
| Ok(ref val) => val, | ||
| ^^^ types differ in mutability | ||
| | ||
= note: expected mutable reference `&mut Counter` | ||
found reference `&Arc<Counter>` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.