Commit 25cb339
authored
# Objective
Don't ignore default query filters for `EntityRef` or `EntityMut`.
Currently, `Query<EntityRef>` will include entities with a `Disabled`
component, even though queries like `Query<()>` or `Query<Entity>` would
not. This was noticed in
#19711 (comment).
## Solution
Change `Access::contains` to completely ignore read access and just look
at filters and archetypal access. Filters covers `With`, `Without`, `&`,
and `&mut`, while archetypal covers `Has` and `Allows`.
Note that `Option<&Disabled>` will no longer count as a use of
`Disabled`, though.
1 parent 9e1e8bc commit 25cb339
2 files changed
+26
-13
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
205 | 205 | | |
206 | 206 | | |
207 | 207 | | |
208 | | - | |
| 208 | + | |
209 | 209 | | |
210 | 210 | | |
211 | 211 | | |
| |||
278 | 278 | | |
279 | 279 | | |
280 | 280 | | |
| 281 | + | |
281 | 282 | | |
282 | | - | |
283 | | - | |
284 | | - | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
285 | 286 | | |
286 | 287 | | |
287 | 288 | | |
288 | 289 | | |
289 | | - | |
| 290 | + | |
290 | 291 | | |
291 | 292 | | |
292 | | - | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
293 | 297 | | |
294 | 298 | | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
295 | 302 | | |
296 | | - | |
| 303 | + | |
297 | 304 | | |
298 | 305 | | |
299 | | - | |
| 306 | + | |
300 | 307 | | |
301 | 308 | | |
302 | | - | |
| 309 | + | |
303 | 310 | | |
304 | 311 | | |
305 | | - | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
306 | 318 | | |
307 | 319 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1225 | 1225 | | |
1226 | 1226 | | |
1227 | 1227 | | |
1228 | | - | |
| 1228 | + | |
| 1229 | + | |
| 1230 | + | |
1229 | 1231 | | |
1230 | | - | |
1231 | | - | |
| 1232 | + | |
1232 | 1233 | | |
1233 | 1234 | | |
1234 | 1235 | | |
| |||
0 commit comments