mirror of
https://github.com/spacedriveapp/spacedrive.git
synced 2025-12-11 20:15:30 +01:00
cargo fmt
This commit is contained in:
parent
5b1c7d5733
commit
00c98bde24
@ -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
|
||||
|
||||
@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
@ -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)]
|
||||
|
||||
@ -121,7 +121,8 @@ impl EventFilters {
|
||||
|
||||
// Check system files
|
||||
if self.skip_system_files
|
||||
&& (path_str.contains(".DS_Store") || path_str.contains("Thumbs.db")) {
|
||||
&& (path_str.contains(".DS_Store") || path_str.contains("Thumbs.db"))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@ -129,8 +129,7 @@ pub fn get_best_linker() -> Option<String> {
|
||||
return Some("lld".to_string());
|
||||
}
|
||||
}
|
||||
} else if cfg!(target_os = "windows")
|
||||
&& has_linker("lld-link") {
|
||||
} else if cfg!(target_os = "windows") && has_linker("lld-link") {
|
||||
return Some("lld-link".to_string());
|
||||
}
|
||||
None
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user