cargo fmt

This commit is contained in:
Jamie Pine 2025-12-10 15:27:26 -08:00
parent 5b1c7d5733
commit 00c98bde24
6 changed files with 26 additions and 19 deletions

View File

@ -23,7 +23,10 @@ pub struct ServerState {
}
/// Find library folder by UUID (reads library.json files to match ID)
async fn find_library_folder(data_dir: &std::path::Path, library_id: &str) -> Result<PathBuf, StatusCode> {
async fn find_library_folder(
data_dir: &std::path::Path,
library_id: &str,
) -> Result<PathBuf, StatusCode> {
let libraries_dir = data_dir.join("libraries");
// Read all .sdlibrary folders

View File

@ -175,7 +175,9 @@ impl ConstantTimeEqNull for [u8] {
#[inline]
fn ct_eq_null(&self) -> Choice {
let mut x = 1u8;
for b in self { b.cmovne(&0, 0u8, &mut x); }
for b in self {
b.cmovne(&0, 0u8, &mut x);
}
Choice::from(x)
}
}

View File

@ -92,7 +92,8 @@ impl FrameDecoder {
})
}
#[must_use] pub const fn use_embedded(&self) -> bool {
#[must_use]
pub const fn use_embedded(&self) -> bool {
self.embedded
}
@ -224,7 +225,8 @@ impl FrameDecoder {
})
}
#[must_use] pub fn get_duration_secs(&self) -> Option<f64> {
#[must_use]
pub fn get_duration_secs(&self) -> Option<f64> {
self.format_ctx.duration().map(|duration| {
let av_time_base = i64::from(AV_TIME_BASE);
#[allow(clippy::cast_precision_loss)]

View File

@ -115,15 +115,16 @@ impl EventFilters {
|| path_str.contains(".temp")
|| path_str.ends_with("~")
|| path_str.ends_with(".swp"))
{
return true;
}
{
return true;
}
// Check system files
if self.skip_system_files
&& (path_str.contains(".DS_Store") || path_str.contains("Thumbs.db")) {
return true;
}
&& (path_str.contains(".DS_Store") || path_str.contains("Thumbs.db"))
{
return true;
}
// Check hidden files
if self.skip_hidden {

View File

@ -49,11 +49,11 @@ pub fn detect_sequences(groups: &[LogGroup]) -> Vec<SequencePattern> {
if !used_indices[current]
&& template_ids[current..current + window_size] == *pattern
{
repetitions += 1;
// Mark as used
for item in used_indices.iter_mut().skip(current).take(window_size) {
*item = true;
}
repetitions += 1;
// Mark as used
for item in used_indices.iter_mut().skip(current).take(window_size) {
*item = true;
}
current += window_size;
} else {
break;

View File

@ -129,9 +129,8 @@ pub fn get_best_linker() -> Option<String> {
return Some("lld".to_string());
}
}
} else if cfg!(target_os = "windows")
&& has_linker("lld-link") {
return Some("lld-link".to_string());
}
} else if cfg!(target_os = "windows") && has_linker("lld-link") {
return Some("lld-link".to_string());
}
None
}