Skip to content

Commit d9ea73d

Browse files
committed
clippy
1 parent 7370a11 commit d9ea73d

File tree

2 files changed

+14
-17
lines changed

2 files changed

+14
-17
lines changed

apps/desktop/src/utils/tauri.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,6 @@ uploadProgressEvent: "upload-progress-event"
358358

359359
/** user-defined types **/
360360

361-
export type AllGpusInfo = { gpus: GpuInfoDiag[]; primaryGpuIndex: number | null; isMultiGpuSystem: boolean; hasDiscreteGpu: boolean }
362361
export type Annotation = { id: string; type: AnnotationType; x: number; y: number; width: number; height: number; strokeColor: string; strokeWidth: number; fillColor: string; opacity: number; rotation: number; text: string | null; maskType?: MaskType | null; maskLevel?: number | null }
363362
export type AnnotationType = "arrow" | "circle" | "rectangle" | "text" | "mask"
364363
export type AppTheme = "system" | "light" | "dark"
@@ -424,7 +423,6 @@ quality: number | null;
424423
* Whether to prioritize speed over quality (default: false)
425424
*/
426425
fast: boolean | null }
427-
export type GpuInfoDiag = { vendor: string; description: string; dedicatedVideoMemoryMb: number; adapterIndex: number; isSoftwareAdapter: boolean; isBasicRenderDriver: boolean; supportsHardwareEncoding: boolean }
428426
export type HapticPattern = "alignment" | "levelChange" | "generic"
429427
export type HapticPerformanceTime = "default" | "now" | "drawCompleted"
430428
export type Hotkey = { code: string; meta: boolean; ctrl: boolean; alt: boolean; shift: boolean }
@@ -437,6 +435,7 @@ export type JsonValue<T> = [T]
437435
export type LogicalBounds = { position: LogicalPosition; size: LogicalSize }
438436
export type LogicalPosition = { x: number; y: number }
439437
export type LogicalSize = { width: number; height: number }
438+
export type MacOSVersionInfo = { displayName: string }
440439
export type MainWindowRecordingStartBehaviour = "close" | "minimise"
441440
export type MaskKeyframes = { position?: MaskVectorKeyframe[]; size?: MaskVectorKeyframe[]; intensity?: MaskScalarKeyframe[] }
442441
export type MaskKind = "sensitive" | "highlight"
@@ -479,7 +478,6 @@ export type RecordingStatus = "pending" | "recording"
479478
export type RecordingStopped = null
480479
export type RecordingTargetMode = "display" | "window" | "area"
481480
export type RenderFrameEvent = { frame_number: number; fps: number; resolution_base: XY<number> }
482-
export type RenderingStatus = { isUsingSoftwareRendering: boolean; isUsingBasicRenderDriver: boolean; hardwareEncodingAvailable: boolean; warningMessage: string | null }
483481
export type RequestOpenRecordingPicker = { target_mode: RecordingTargetMode | null }
484482
export type RequestOpenSettings = { page: string }
485483
export type RequestScreenCapturePrewarm = { force?: boolean }
@@ -500,7 +498,7 @@ export type StartRecordingInputs = { capture_target: ScreenCaptureTarget; captur
500498
export type StereoMode = "stereo" | "monoL" | "monoR"
501499
export type StudioRecordingMeta = { segment: SingleSegment } | { inner: MultipleSegments }
502500
export type StudioRecordingStatus = { status: "InProgress" } | { status: "NeedsRemux" } | { status: "Failed"; error: string } | { status: "Complete" }
503-
export type SystemDiagnostics = { windowsVersion: WindowsVersionInfo | null; gpuInfo: GpuInfoDiag | null; allGpus: AllGpusInfo | null; renderingStatus: RenderingStatus; availableEncoders: string[]; graphicsCaptureSupported: boolean; d3D11VideoProcessorAvailable: boolean }
501+
export type SystemDiagnostics = { macosVersion: MacOSVersionInfo | null; availableEncoders: string[]; screenCaptureSupported: boolean }
504502
export type TargetUnderCursor = { display_id: DisplayId | null; window: WindowUnderCursor | null }
505503
export type TextSegment = { start: number; end: number; enabled?: boolean; content?: string; center?: XY<number>; size?: XY<number>; fontFamily?: string; fontSize?: number; fontWeight?: number; italic?: boolean; color?: string; fadeDuration?: number }
506504
export type TimelineConfiguration = { segments: TimelineSegment[]; zoomSegments: ZoomSegment[]; sceneSegments?: SceneSegment[]; maskSegments?: MaskSegment[]; textSegments?: TextSegment[] }
@@ -517,7 +515,6 @@ export type VideoUploadInfo = { id: string; link: string; config: S3UploadMeta }
517515
export type WindowExclusion = { bundleIdentifier?: string | null; ownerName?: string | null; windowTitle?: string | null }
518516
export type WindowId = string
519517
export type WindowUnderCursor = { id: WindowId; app_name: string; bounds: LogicalBounds }
520-
export type WindowsVersionInfo = { major: number; minor: number; build: number; displayName: string; meetsRequirements: boolean; isWindows11: boolean }
521518
export type XY<T> = { x: T; y: T }
522519
export type ZoomMode = "auto" | { manual: { x: number; y: number } }
523520
export type ZoomSegment = { start: number; end: number; amount: number; mode: ZoomMode }

crates/recording/src/output_pipeline/macos_segmented_ffmpeg.rs

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -237,10 +237,10 @@ impl Muxer for MacOSSegmentedMuxer {
237237
}
238238
}
239239

240-
if let Ok(mut output) = state.output.lock() {
241-
if let Err(e) = output.write_trailer() {
242-
warn!("Failed to write trailer for segment {current_index}: {e}");
243-
}
240+
if let Ok(mut output) = state.output.lock()
241+
&& let Err(e) = output.write_trailer()
242+
{
243+
warn!("Failed to write trailer for segment {current_index}: {e}");
244244
}
245245

246246
fragmentation::sync_file(&segment_path);
@@ -421,10 +421,10 @@ impl MacOSSegmentedMuxer {
421421
}
422422
}
423423

424-
if let Ok(mut output) = output_clone.lock() {
425-
if let Err(e) = encoder.flush(&mut output) {
426-
warn!("Failed to flush encoder: {e}");
427-
}
424+
if let Ok(mut output) = output_clone.lock()
425+
&& let Err(e) = encoder.flush(&mut output)
426+
{
427+
warn!("Failed to flush encoder: {e}");
428428
}
429429

430430
drop(encoder);
@@ -493,10 +493,10 @@ impl MacOSSegmentedMuxer {
493493
}
494494
}
495495

496-
if let Ok(mut output) = output.lock() {
497-
if let Err(e) = output.write_trailer() {
498-
warn!("Failed to write trailer for segment {current_index}: {e}");
499-
}
496+
if let Ok(mut output) = output.lock()
497+
&& let Err(e) = output.write_trailer()
498+
{
499+
warn!("Failed to write trailer for segment {current_index}: {e}");
500500
}
501501

502502
fragmentation::sync_file(&path_for_sync);

0 commit comments

Comments
 (0)