mirror of
https://github.com/bevyengine/bevy
synced 2024-11-22 12:43:34 +00:00
6521e759ea
# Objective The previous `PhantomData` instances were written somewhat lazily, so they were just things like `PhantomData<T>` for curves with an output type of `T`. This looks innocuous, but it unnecessarily constrains `Send/Sync` inference based on `T`. See [here](https://doc.rust-lang.org/nomicon/phantom-data.html#table-of-phantomdata-patterns). ## Solution Switch to `PhantomData` of the form `PhantomData<fn() -> T>` for most of these adaptors. Since they only have a functional relationship to `T` (i.e. it shows up in the return type of trait methods), this is more accurate. ## Testing Tested by compiling Bevy. Co-authored-by: François Mockers <mockersf@gmail.com> |
||
---|---|---|
.. | ||
src | ||
Cargo.toml | ||
clippy.toml | ||
README.md |