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

Switch bevy_asset to core::prelude #17442

Merged
merged 5 commits into from
Jan 20, 2025

Conversation

bushrat011899
Copy link
Contributor

Makes use of std explicit, simplifying a possible no_std port.

Objective

Solution

  • Add #![no_std] to switch to core::prelude instead of std::prelude

Testing

  • CI

Notes

This is entirely a change around the names of imports and has no impact on functionality. This just reduces the quantity of changes involved in the (likely more controversial) no_std-ification of bevy_asset.

Makes use of `std` explicit, simplifying a possible `no_std` port.
use core::num::NonZero;
use std::println;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Boo!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Exactly, I wonder if Bevy should actually prohibit eprintln and println since we always have access to log and/or tracing...

@alice-i-cecile alice-i-cecile added D-Trivial Nice and easy! A great choice to get started with Bevy A-Assets Load files from disk to use for things like images, models, and sounds O-Embedded Weird hardware and no_std platforms C-Code-Quality A section of code that is hard to understand or change S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it labels Jan 19, 2025
auto-merge was automatically disabled January 19, 2025 22:54

Head branch was pushed to by a user without write access

@bushrat011899
Copy link
Contributor Author

bushrat011899 commented Jan 19, 2025

Ok that should be the last fix. Hubris...

@alice-i-cecile alice-i-cecile added this pull request to the merge queue Jan 20, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jan 20, 2025
@alice-i-cecile alice-i-cecile added this pull request to the merge queue Jan 20, 2025
Merged via the queue into bevyengine:main with commit 8f32c79 Jan 20, 2025
28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Assets Load files from disk to use for things like images, models, and sounds C-Code-Quality A section of code that is hard to understand or change D-Trivial Nice and easy! A great choice to get started with Bevy O-Embedded Weird hardware and no_std platforms S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants