mirror of
https://github.com/spacedriveapp/spacedrive.git
synced 2025-12-11 20:15:30 +01:00
Rust fmt
This commit is contained in:
parent
16f37c9216
commit
70ea030c97
@ -1167,7 +1167,8 @@ impl JobTaskDispatcher {
|
||||
matches!(
|
||||
*state,
|
||||
JobRunningState::Running
|
||||
| JobRunningState::Canceled | JobRunningState::Shutdown
|
||||
| JobRunningState::Canceled
|
||||
| JobRunningState::Shutdown
|
||||
)
|
||||
})
|
||||
.await
|
||||
|
||||
@ -344,8 +344,10 @@ impl Status {
|
||||
matches!(
|
||||
self,
|
||||
Self::Completed
|
||||
| Self::Canceled | Self::Paused
|
||||
| Self::Failed | Self::CompletedWithErrors
|
||||
| Self::Canceled
|
||||
| Self::Paused
|
||||
| Self::Failed
|
||||
| Self::CompletedWithErrors
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@ -83,7 +83,9 @@ pub async fn load_jobs<OuterCtx: OuterContext, JobCtx: JobContext<OuterCtx>>(
|
||||
root_job: StoredJob { id, .. },
|
||||
next_jobs,
|
||||
..
|
||||
}| { iter::once(*id).chain(next_jobs.iter().map(|StoredJob { id, .. }| *id)) },
|
||||
}| {
|
||||
iter::once(*id).chain(next_jobs.iter().map(|StoredJob { id, .. }| *id))
|
||||
},
|
||||
)
|
||||
.map(|job_id| uuid_to_bytes(&job_id))
|
||||
.collect::<Vec<_>>(),
|
||||
|
||||
@ -61,12 +61,15 @@ pub const fn can_extract_for_audio(audio_extension: AudioExtension) -> bool {
|
||||
matches!(
|
||||
audio_extension,
|
||||
Mp3 | Mp2
|
||||
| M4a | Wav | Aiff
|
||||
| Aif | Flac | Ogg
|
||||
| Oga | Opus | Wma
|
||||
| Amr | Aac | Wv
|
||||
| Voc | Tta | Loas
|
||||
| Caf | Aptx | Adts
|
||||
| M4a | Wav
|
||||
| Aiff | Aif
|
||||
| Flac | Ogg
|
||||
| Oga | Opus
|
||||
| Wma | Amr
|
||||
| Aac | Wv
|
||||
| Voc | Tta
|
||||
| Loas | Caf
|
||||
| Aptx | Adts
|
||||
| Ast | Mid
|
||||
)
|
||||
}
|
||||
@ -81,15 +84,18 @@ pub const fn can_extract_for_video(video_extension: VideoExtension) -> bool {
|
||||
matches!(
|
||||
video_extension,
|
||||
Avi | Avifs
|
||||
| Qt | Mov | Swf
|
||||
| Mjpeg | Mpeg
|
||||
| Mxf | M2v | Mpg
|
||||
| Mpe | M2ts | Flv
|
||||
| Wm | _3gp | M4v
|
||||
| Wmv | Asf | Mp4
|
||||
| Webm | Mkv | Vob
|
||||
| Ogv | Wtv | Hevc
|
||||
| F4v // | Ts | Mts TODO: Uncomment when we start using magic instead of extension
|
||||
| Qt | Mov
|
||||
| Swf | Mjpeg
|
||||
| Mpeg | Mxf
|
||||
| M2v | Mpg
|
||||
| Mpe | M2ts
|
||||
| Flv | Wm
|
||||
| _3gp | M4v
|
||||
| Wmv | Asf
|
||||
| Mp4 | Webm
|
||||
| Mkv | Vob
|
||||
| Ogv | Wtv
|
||||
| Hevc | F4v // | Ts | Mts TODO: Uncomment when we start using magic instead of extension
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@ -284,7 +284,7 @@ impl Manager {
|
||||
device_pub_id: &'a DevicePubId,
|
||||
chunk_size: u32,
|
||||
initial_timestamp: NTP64,
|
||||
) -> impl Stream<Item = Result<Vec<CRDTOperation>, Error>> + Send + '_ {
|
||||
) -> impl Stream<Item = Result<Vec<CRDTOperation>, Error>> + Send + 'a {
|
||||
stream! {
|
||||
let mut current_initial_timestamp = initial_timestamp;
|
||||
|
||||
|
||||
@ -752,7 +752,8 @@ async fn create_location(
|
||||
.location()
|
||||
.count(vec![location::path::equals(Some(path.clone()))])
|
||||
.exec()
|
||||
.await? > 0
|
||||
.await?
|
||||
> 0
|
||||
{
|
||||
return Err(LocationError::LocationAlreadyExists(location_path.into()));
|
||||
}
|
||||
|
||||
@ -418,8 +418,10 @@ impl JobStatus {
|
||||
matches!(
|
||||
self,
|
||||
Self::Completed
|
||||
| Self::Canceled | Self::Paused
|
||||
| Self::Failed | Self::CompletedWithErrors
|
||||
| Self::Canceled
|
||||
| Self::Paused
|
||||
| Self::Failed
|
||||
| Self::CompletedWithErrors
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user