fn main() {
let mut world = World::new();
let e = world.spawn(Foo { x: 42, y: 'a' });
assert_eq!(*world.get::<&i32>(e).unwrap(), 42);
}
"""
I have errors:
error: cannot find derive macro Bundle in this scope
--> src/main.rs:2:10
2
#[derive(Bundle)]
^^^^^^
note: Bundle is imported here, but it is only a trait, without a derive macro
--> src/main.rs:1:5
|
1 | use hecs::Bundle;
| ^^^^^^^^^^^^
My code: """ use hecs::Bundle;
[derive(Bundle)]
struct Foo { x: i32, y: char, }
Bundle
in this scope --> src/main.rs:2:10note:
Bundle
is imported here, but it is only a trait, without a derive macro --> src/main.rs:1:5 | 1 | use hecs::Bundle; | ^^^^^^^^^^^^