Skip to content

Commit

Permalink
fix warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
thewh1teagle committed Jun 19, 2024
1 parent 50d3cdb commit 1987642
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion desktop/src-tauri/src/cmd/audio.rs
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ pub async fn start_record(app_handle: AppHandle, devices: Vec<AudioDevice>, stor
&config.into(),
move |data, _: &_| {
log::debug!("Writing input data (I8)");
write_input_data::<i8, i8>(data, &writer_2, volume_factor.into())
write_input_data::<i8, i8>(data, &writer_2, volume_factor)
},
err_fn,
None,
Expand Down
2 changes: 1 addition & 1 deletion desktop/src-tauri/src/cmd/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ pub fn get_x86_features() -> Option<Value> {
#[cfg(all(any(target_arch = "x86", target_arch = "x86_64"), target_os = "windows"))]
{
let features: Value = serde_json::to_value(crate::x86_features::X86features::new()).unwrap_or_default();
return Some(features);
Some(features)
}

#[cfg(not(all(any(target_arch = "x86", target_arch = "x86_64"), target_os = "windows")))]
Expand Down
4 changes: 4 additions & 0 deletions desktop/src-tauri/src/x86_features.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,22 @@ impl X86features {
// Disabled only if WHISPER_NO_{flag} was set during compile
Self {
avx: X86feature {
#[allow(clippy::comparison_to_empty)]
enabled: env!("WHISPER_NO_AVX") != "ON",
support: is_x86_feature_detected!("avx"),
},
avx2: X86feature {
#[allow(clippy::comparison_to_empty)]
enabled: env!("WHISPER_NO_AVX2") != "ON",
support: is_x86_feature_detected!("avx2"),
},
fma: X86feature {
#[allow(clippy::comparison_to_empty)]
enabled: env!("WHISPER_NO_FMA") != "ON",
support: is_x86_feature_detected!("fma"),
},
f16c: X86feature {
#[allow(clippy::comparison_to_empty)]
enabled: env!("WHISPER_NO_F16C") != "ON",
support: is_x86_feature_detected!("f16c"),
},
Expand Down

0 comments on commit 1987642

Please sign in to comment.