jkb0o / belly

Define the Bevy UI tree with `eml!`, style it using a very-css-like `ess` syntax and relate data data with `bind!` and `connect!`
Apache License 2.0
406 stars 32 forks source link

drain_filter not found error in connect.rs #79

Closed ccleavinger closed 11 months ago

ccleavinger commented 11 months ago

I was following Phaestus Fox's bevy 2d platformer tutorial and git cloned his repo when I tried to run it I got this error:

error[E0599]: no method named drain_filter found for struct std::collections::HashMap in the current scope --> C:\Users\caleb.cargo\git\checkouts\belly-6f46a1ea7d2f8371\2157ac7\crates\belly_core\src\relations\connect.rs:314:33 | 314 | connections.sources.drainfilter(|entity, | { | --------------------^^^^^^^^^^^^ method not found in HashMap<Option<Entity>, Vec<(Option<Entity>, Handler<Q, E>)>>

I've seen people mention that this is a nightly feature and I've built with my rust-toolchain.toml set to nightly and stable, both times I've gotten this exact same error.

jkb0o commented 11 months ago

Looks like the belly version should be specified. The platformer repo uses own belly fork: https://github.com/PhaestusFox/bevy_platformer/blob/be3859de4a6c12fd712dfd13fb7946333b251c03/Cargo.toml#L22C1-L22C57

It probably will compile if you use original repo and specify exact revesion, something like:

belly = {git="https://github.com/jkb0o/belly.git" rev="ddd29fc" }
ccleavinger commented 11 months ago

Ok thanks! Sorry for the issue, still new to rust.

On Mon, Dec 4, 2023, 1:39 PM Yasha Borevich @.***> wrote:

Looks like the belly version should be specified. The platformer repo uses own belly fork: https://github.com/PhaestusFox/bevy_platformer/blob/be3859de4a6c12fd712dfd13fb7946333b251c03/Cargo.toml#L22C1-L22C57

It probably will compile if you use original repo and specify exact revesion, something like:

belly = {git="https://github.com/jkb0o/belly.git" rev="ddd29fc" }

— Reply to this email directly, view it on GitHub https://github.com/jkb0o/belly/issues/79#issuecomment-1839349643, or unsubscribe https://github.com/notifications/unsubscribe-auth/AXCDEJXI4THV2KFORXAU7V3YHYRF3AVCNFSM6AAAAABADDGDZWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMZZGM2DSNRUGM . You are receiving this because you authored the thread.Message ID: @.***>