rustpotter detections optimization + few code improvements
This commit is contained in:
parent
88d73eeb10
commit
61b7a79455
12 changed files with 64 additions and 58 deletions
|
|
@ -11,7 +11,7 @@ use crate::{config, DB, SOUND_DIR};
|
|||
static AUDIO_TYPE: OnceCell<AudioType> = OnceCell::new();
|
||||
|
||||
pub fn init() -> Result<(), ()> {
|
||||
if !AUDIO_TYPE.get().is_none() {
|
||||
if AUDIO_TYPE.get().is_some() {
|
||||
return Ok(());
|
||||
} // already initialized
|
||||
|
||||
|
|
@ -29,7 +29,7 @@ pub fn init() -> Result<(), ()> {
|
|||
Ok(_) => {
|
||||
info!("Successfully initialized Rodio audio backend.");
|
||||
}
|
||||
Err(msg) => {
|
||||
Err(()) => {
|
||||
error!("Failed to initialize Rodio audio backend.");
|
||||
|
||||
return Err(());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue