chore: Fix several style lints (#17488)

It's not comprehensive enough to start linting on `style` group, but
hey, it's a start.

Release Notes:

- N/A
This commit is contained in:
Piotr Osiewicz 2024-09-06 11:58:39 +02:00 committed by GitHub
parent 93249fc82b
commit e6c1c51b37
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
361 changed files with 3530 additions and 3587 deletions

View file

@ -44,7 +44,7 @@ impl SoundRegistry {
let bytes = self
.assets
.load(&path)?
.map(|asset| Ok(asset))
.map(Ok)
.unwrap_or_else(|| Err(anyhow::anyhow!("No such asset available")))?
.into_owned();
let cursor = Cursor::new(bytes);

View file

@ -33,6 +33,7 @@ impl Sound {
}
}
#[derive(Default)]
pub struct Audio {
_output_stream: Option<OutputStream>,
output_handle: Option<OutputStreamHandle>,
@ -45,10 +46,7 @@ impl Global for GlobalAudio {}
impl Audio {
pub fn new() -> Self {
Self {
_output_stream: None,
output_handle: None,
}
Self::default()
}
fn ensure_output_exists(&mut self) -> Option<&OutputStreamHandle> {