Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

crate_name misused in Bundle macro #812

Closed
Plecra opened this issue Nov 8, 2020 · 1 comment
Closed

crate_name misused in Bundle macro #812

Plecra opened this issue Nov 8, 2020 · 1 comment
Labels
A-ECS Entities, components, systems, and events C-Feature A new feature, making something new possible

Comments

@Plecra
Copy link
Contributor

Plecra commented Nov 8, 2020

let path_str = if crate_name("bevy").is_ok() {

crate_name returns the new name of the crate if it has been renamed, making this sort of import more robust. The "real" name should instead be used:

let path_str = if let Ok(name) = crate_name("bevy") {
    format!("{}::ecs", name)
}
// ...
@karroffel karroffel added A-ECS Entities, components, systems, and events C-Feature A new feature, making something new possible labels Nov 8, 2020
@cart
Copy link
Member

cart commented Nov 11, 2020

Resolved by #808

@cart cart closed this as completed Nov 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-ECS Entities, components, systems, and events C-Feature A new feature, making something new possible
Projects
None yet
Development

No branches or pull requests

3 participants