Skip to content

Commit 7dbf40b

Browse files
authored
Fix FileAssetReader clippy on Windows (#22648)
#22560 added this code: ```rust .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 ```
1 parent 9b9a070 commit 7dbf40b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

crates/bevy_asset/src/io/file/file_asset.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ impl AssetReader for FileAssetReader {
9191
#[cfg(not(target_os = "windows"))]
9292
_guard,
9393
#[cfg(target_os = "windows")]
94-
_lifetime: PhantomData::default(),
94+
_lifetime: PhantomData,
9595
})
9696
}
9797

@@ -115,7 +115,7 @@ impl AssetReader for FileAssetReader {
115115
#[cfg(not(target_os = "windows"))]
116116
_guard,
117117
#[cfg(target_os = "windows")]
118-
_lifetime: PhantomData::default(),
118+
_lifetime: PhantomData,
119119
})
120120
}
121121

0 commit comments

Comments
 (0)