Skip to content

Commit 319c471

Browse files
committed
refactor: address clippy lints and update to Rust 1.87.
1 parent f80fa50 commit 319c471

File tree

8 files changed

+239
-30
lines changed

8 files changed

+239
-30
lines changed

Cargo.lock

Lines changed: 229 additions & 17 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

framework_crates/bones_asset/src/server.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -876,10 +876,7 @@ impl AssetServer {
876876
SchemaMismatchError,
877877
>,
878878
> {
879-
let cid = match self.store.asset_ids.get(&handle.untyped()) {
880-
Some(cid) => cid,
881-
None => return None,
882-
};
879+
let cid = self.store.asset_ids.get(&handle.untyped())?;
883880
Some(
884881
MapRef::try_map(self.store.assets.get(&cid).unwrap(), |x| {
885882
let asset = &x.data;

framework_crates/bones_framework/src/audio/audio_center.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -308,9 +308,10 @@ pub fn _process_audio_events(
308308
force_restart,
309309
} => {
310310
let should_play = force_restart
311-
|| audio_center.music.as_ref().map_or(true, |current_music| {
312-
sound_source != current_music.bones_handle
313-
});
311+
|| audio_center
312+
.music
313+
.as_ref()
314+
.is_none_or(|current_music| sound_source != current_music.bones_handle);
314315

315316
if should_play {
316317
// Stop the current music

0 commit comments

Comments
 (0)