Commit e36d876
impl Clone for bevy_light Shader markers (bevyengine#23671)
# Objective
Enable the use of `NotShadowReceiver` in `bsn!` by implementing `Clone`
(`Default` is already implemented).
```rust
error[E0277]: the trait bound `NotShadowReceiver: Clone` is not satisfied
--> src/spawn_circle.rs:375:27
|
375 | world.spawn_scene(bsn! {
| ___________________________^
376 | | #SpawnCircle
377 | | SpawnCircle
378 | | SpawnEventToTrigger({self.event})
... |
394 | | )]
395 | | });
| |_________^ the trait `Clone` is not implemented for `NotShadowReceiver`
|
```
I also noticed `TransmittedShadowReceiver` would have the same issue, so
added `Clone` there as well.
---
An alternative would be to implement `FromTemplate` instead of `Default`
and `Clone`. I'm not sure which solution is preferred in general, but
these are Marker components so don't require any additional values.1 parent 31b0078 commit e36d876
1 file changed
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
259 | 259 | | |
260 | 260 | | |
261 | 261 | | |
262 | | - | |
| 262 | + | |
263 | 263 | | |
264 | 264 | | |
265 | 265 | | |
| |||
269 | 269 | | |
270 | 270 | | |
271 | 271 | | |
272 | | - | |
| 272 | + | |
273 | 273 | | |
274 | 274 | | |
275 | 275 | | |
| |||
0 commit comments