Comments (2)
Seems this doesn't happen with flush
commands, but it does happen with system
commands. For example,
#[derive(Clone)]
struct A(f32);
#[derive(Clone)]
struct B(f32);
#[derive(Clone)]
struct C(f32);
#[derive(Clone)]
struct D(f32);
#[derive(Clone)]
struct E(f32);
type Registry = registry!(A, B, C, D, E);
struct AB;
impl<'a> System<'a> for AB {
type Views = views!(&'a mut A, &'a mut B);
type Filter = filter::None;
fn run<R, FI, VI, P, I, Q>(
&mut self,
query_results: result::Iter<'a, R, Self::Filter, FI, Self::Views, VI, P, I, Q>,
) where
R: ContainsQuery<'a, Self::Filter, FI, Self::Views, VI, P, I, Q> + 'a,
{
for result!(a, b) in query_results {
core::mem::swap(&mut a.0, &mut b.0);
}
}
}
struct CD;
impl<'a> System<'a> for CD {
type Views = views!(&'a mut C, &'a mut D);
type Filter = filter::None;
fn run<R, FI, VI, P, I, Q>(
&mut self,
query_results: result::Iter<'a, R, Self::Filter, FI, Self::Views, VI, P, I, Q>,
) where
R: ContainsQuery<'a, Self::Filter, FI, Self::Views, VI, P, I, Q> + 'a,
{
for result!(c, d) in query_results {
core::mem::swap(&mut c.0, &mut d.0);
}
}
}
struct CE;
impl<'a> System<'a> for CE {
type Views = views!(&'a mut C, &'a mut E);
type Filter = filter::None;
fn run<R, FI, VI, P, I, Q>(
&mut self,
query_results: result::Iter<'a, R, Self::Filter, FI, Self::Views, VI, P, I, Q>,
) where
R: ContainsQuery<'a, Self::Filter, FI, Self::Views, VI, P, I, Q> + 'a,
{
for result!(c, e) in query_results {
core::mem::swap(&mut c.0, &mut e.0);
}
}
}
type Stages = stages!(
system: AB,
system: CD,
system: CE
);
does not compile, but adding the comma after CE
does compile.
from brood.
Turns out a !
character was missing from the macro definition on this line.
from brood.
Related Issues (20)
- Migrate to new GitHub Codecov app.
- Querying with an empty `Views` causes an endless loop. HOT 2
- Accessing `Entry`s during queries HOT 1
- Production Ready HOT 1
- Reducing `System` interface complexity HOT 1
- Entry access does not work in `System`s HOT 5
- Reducing the number of index generic parameters
- Consider serializing with field names for human-readable formats HOT 1
- Add new task type for systems borrowing non-`Sync` components
- Expand query-time `Entry` access into more diverse `World` access.
- Add `Entries` access to query and modify multiple entity `Entry`s at once
- `Entry` API does not update `archetype::Identifier` after entity shape change. HOT 1
- Viewing one of two views with `Either` HOT 1
- Investigate reimplementing adding and removing components without `TypeId` checks
- Larger schedules cause compile times to balloon HOT 2
- Remove allocation when adding and removing components
- Run `trybuild` tests on stable
- Possibility of a World::retain() method? HOT 4
- Serialization and deserialization of the world changes world behaviour. HOT 4
- Consider making serialization deterministic
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from brood.