Open source Loom alternative. Beautiful, shareable screen recordings.
Rust appcapcossloommacnextjsnextjs15open-sourceossreactrecordrustscreen-capturescreen-recorderscreenshotsolidjstauritauri-apptypescriptvite
clippy
Richie McIlroy66ec5bb0bf16
diff --git a/crates/recording/src/output_pipeline/win_segmented.rs b/crates/recording/src/output_pipeline/win_segmented.rsindex 0ecb1f717..7a134ebfe 100644--- a/crates/recording/src/output_pipeline/win_segmented.rs+++ b/crates/recording/src/output_pipeline/win_segmented.rs@@ -579,18 +579,17 @@ impl VideoMuxer for WindowsSegmentedMuxer {self.rotate_segment(adjusted_timestamp)?;}- if let Some(state) = &self.current_state {- if let Err(e) = state+ if let Some(state) = &self.current_state+ && let Err(e) = state.video_tx.try_send(Some((frame.frame, adjusted_timestamp)))- {- match e {- std::sync::mpsc::TrySendError::Full(_) => {- trace!("Screen encoder channel full, dropping frame");- }- std::sync::mpsc::TrySendError::Disconnected(_) => {- trace!("Screen encoder channel disconnected");- }+ {+ match e {+ std::sync::mpsc::TrySendError::Full(_) => {+ trace!("Screen encoder channel full, dropping frame");+ }+ std::sync::mpsc::TrySendError::Disconnected(_) => {+ trace!("Screen encoder channel disconnected");}}}diff --git a/crates/recording/src/output_pipeline/win_segmented_camera.rs b/crates/recording/src/output_pipeline/win_segmented_camera.rsindex 334a540d9..97a4e5b16 100644--- a/crates/recording/src/output_pipeline/win_segmented_camera.rs+++ b/crates/recording/src/output_pipeline/win_segmented_camera.rs@@ -533,15 +533,15 @@ impl VideoMuxer for WindowsSegmentedCameraMuxer {self.rotate_segment(adjusted_timestamp, &frame)?;}- if let Some(state) = &self.current_state {- if let Err(e) = state.video_tx.try_send(Some((frame, adjusted_timestamp))) {- match e {- std::sync::mpsc::TrySendError::Full(_) => {- trace!("Camera encoder channel full, dropping frame");- }- std::sync::mpsc::TrySendError::Disconnected(_) => {- trace!("Camera encoder channel disconnected");- }+ if let Some(state) = &self.current_state+ && let Err(e) = state.video_tx.try_send(Some((frame, adjusted_timestamp)))+ {+ match e {+ std::sync::mpsc::TrySendError::Full(_) => {+ trace!("Camera encoder channel full, dropping frame");+ }+ std::sync::mpsc::TrySendError::Disconnected(_) => {+ trace!("Camera encoder channel disconnected");}}}diff --git a/crates/rendering/src/d3d_texture.rs b/crates/rendering/src/d3d_texture.rsindex 239c79758..e7201faee 100644--- a/crates/rendering/src/d3d_texture.rs+++ b/crates/rendering/src/d3d_texture.rs@@ -200,21 +200,17 @@ mod windows_impl {))}+ #[derive(Default)]pub struct D3D11WgpuInterop {- cached_width: u32,- cached_height: u32,- y_wgpu_texture: Option<wgpu::Texture>,- uv_wgpu_texture: Option<wgpu::Texture>,+ _cached_width: u32,+ _cached_height: u32,+ _y_wgpu_texture: Option<wgpu::Texture>,+ _uv_wgpu_texture: Option<wgpu::Texture>,}impl D3D11WgpuInterop {pub fn new() -> Self {- Self {- cached_width: 0,- cached_height: 0,- y_wgpu_texture: None,- uv_wgpu_texture: None,- }+ Self::default()}#[allow(unused_variables)]diff --git a/crates/rendering/src/decoder/media_foundation.rs b/crates/rendering/src/decoder/media_foundation.rsindex 9a42f8ba1..2963f09c0 100644--- a/crates/rendering/src/decoder/media_foundation.rs+++ b/crates/rendering/src/decoder/media_foundation.rs@@ -12,10 +12,10 @@ use super::{DecodedFrame, FRAME_CACHE_SIZE, VideoDecoderMessage};#[derive(Clone)]struct CachedFrame {number: u32,- texture: ID3D11Texture2D,- shared_handle: Option<HANDLE>,- y_handle: Option<HANDLE>,- uv_handle: Option<HANDLE>,+ _texture: ID3D11Texture2D,+ _shared_handle: Option<HANDLE>,+ _y_handle: Option<HANDLE>,+ _uv_handle: Option<HANDLE>,nv12_data: Option<Arc<cap_video_decode::NV12Data>>,width: u32,height: u32,@@ -154,10 +154,10 @@ impl MFDecoder {let cached = CachedFrame {number: frame_number,- texture: mf_frame.texture,- shared_handle: mf_frame.shared_handle,- y_handle: mf_frame.y_handle,- uv_handle: mf_frame.uv_handle,+ _texture: mf_frame.texture,+ _shared_handle: mf_frame.shared_handle,+ _y_handle: mf_frame.y_handle,+ _uv_handle: mf_frame.uv_handle,nv12_data,width: mf_frame.width,height: mf_frame.height,@@ -190,15 +190,14 @@ impl MFDecoder {.or_else(|| cache.get(&frame_number))};- if let Some(frame) = frame_to_send {- if let Some(s) = sender.take() {- if s.send(frame.to_decoded_frame()).is_err() {- warn!(- "Failed to send frame {}: receiver dropped",- frame.number- );- }- }+ if let Some(frame) = frame_to_send+ && let Some(s) = sender.take()+ && s.send(frame.to_decoded_frame()).is_err()+ {+ warn!(+ "Failed to send frame {}: receiver dropped",+ frame.number+ );}break;}diff --git a/crates/rendering/src/yuv_converter.rs b/crates/rendering/src/yuv_converter.rsindex f26f4d580..f80699b66 100644--- a/crates/rendering/src/yuv_converter.rs+++ b/crates/rendering/src/yuv_converter.rs@@ -641,6 +641,7 @@ impl YuvToRgbaConverter {}#[cfg(target_os = "windows")]+ #[allow(clippy::too_many_arguments)]pub fn convert_nv12_from_d3d11_texture(&mut self,wgpu_device: &wgpu::Device,