Address lints in bevy_asset (#18502)

# Objective

`cargo clippy -p bevy_asset` warns on a pair of lints on my Windows 10
development machine (return from let binding).

## Solution

Addressed them!

## Testing

- CI
This commit is contained in:
Zachary Harrold 2025-03-24 09:05:12 +11:00 committed by GitHub
parent 7161e9ca20
commit dd56d45557
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 9 deletions

View File

@ -60,8 +60,7 @@ impl Dir {
dir = self.get_or_insert_dir(parent);
}
let key: Box<str> = path.file_name().unwrap().to_string_lossy().into();
let data = dir.0.write().assets.remove(&key);
data
dir.0.write().assets.remove(&key)
}
pub fn insert_meta(&self, path: &Path, value: impl Into<Value>) {

View File

@ -347,14 +347,9 @@ impl AssetInfos {
/// Returns `true` if the asset this path points to is still alive
pub(crate) fn is_path_alive<'a>(&self, path: impl Into<AssetPath<'a>>) -> bool {
let path = path.into();
let result = self
.get_path_ids(&path)
self.get_path_ids(&path.into())
.filter_map(|id| self.infos.get(&id))
.any(|info| info.weak_handle.strong_count() > 0);
result
.any(|info| info.weak_handle.strong_count() > 0)
}
/// Returns `true` if the asset at this path should be reloaded