Commit 000bf5e
committed
Remove
Previously there were two different functions for creating raw functions: one
for "host" functions that had the `Send+Sync` bounds and another for "normal"
functions without.
The implementations of both merged into one implementation and the bounds were
kept.
However, as `IntoFunc` isn't bounded with `Send+Sync`, a transmute was made to
ignore the bounds in `create_raw_function`. The comment for the transmute is
now out of date because the implementation is no longer specific to "host"
functions.
This commit removes the bounds from `create_raw_function` and, by extension,
the transmute call.
This change really doesn't alter any safety semantics as `Send+Sync` is
enforced for host functions when they are defined in `Config`.Send+Sync bounds on create_raw_function.1 parent 3c43ed4 commit 000bf5e
2 files changed
Lines changed: 8 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1787 | 1787 | | |
1788 | 1788 | | |
1789 | 1789 | | |
1790 | | - | |
| 1790 | + | |
| 1791 | + | |
| 1792 | + | |
| 1793 | + | |
| 1794 | + | |
| 1795 | + | |
1791 | 1796 | | |
1792 | 1797 | | |
1793 | 1798 | | |
1794 | 1799 | | |
1795 | 1800 | | |
1796 | 1801 | | |
1797 | 1802 | | |
1798 | | - | |
1799 | | - | |
1800 | | - | |
| 1803 | + | |
1801 | 1804 | | |
1802 | 1805 | | |
1803 | 1806 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
293 | 293 | | |
294 | 294 | | |
295 | 295 | | |
296 | | - | |
| 296 | + | |
297 | 297 | | |
298 | 298 | | |
299 | 299 | | |
| |||
0 commit comments