Skip to content

Conversation

@greeble-dev
Copy link
Contributor

#22560 added this code:

.map(|file| GuardedFile {
    file,
    #[cfg(not(target_os = "windows"))]
    _guard,
    #[cfg(target_os = "windows")]
    _lifetime: PhantomData::default(),
})

But clippy says no!

error: use of `default` to create a unit struct                                                                                              
  --> crates\bevy_asset\src\io\file\file_asset.rs:94:28
   |
94 |                 _lifetime: PhantomData::default(),
   |                            ^^^^^^^^^^^-----------
   |                                       |
   |                                       help: remove this call to `default`
   |

Testing

Tested on Win10 only.

cargo run --example asset_loading

@greeble-dev greeble-dev added 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 S-Needs-Review Needs reviewer attention (from anyone!) to move forward O-Windows Specific to the Windows desktop operating system labels Jan 22, 2026
@alice-i-cecile alice-i-cecile added S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it and removed S-Needs-Review Needs reviewer attention (from anyone!) to move forward labels Jan 22, 2026
@alice-i-cecile alice-i-cecile added this pull request to the merge queue Jan 22, 2026
Merged via the queue into bevyengine:main with commit 7dbf40b Jan 22, 2026
51 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-Windows Specific to the Windows desktop operating system 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