style(agent): clear 77 pre-existing clippy -D warnings
All checks were successful
All checks were successful
CI never ran clippy on the agent crate (the build-server clippy job is Linux-only and can't compile the Windows agent; build-agent only runs cargo build), so 77 clippy -D-warnings errors had accumulated. Behavior-preserving cleanup, code-reviewed APPROVED, locally verified (cargo clippy --workspace --all-targets --all-features -- -D warnings exits 0; cargo test --workspace = 57 passed). - let _ = on Win32 resource-teardown BOOL returns (gdi.rs); fallible BitBlt/GetDIBits stay error-handled - removed unused imports/vars; idiom fixes (div_ceil, is_null, transmute annotations, match collapsing, useless_conversion) - #[allow(dead_code)] + comment on genuine Task-6/7 scaffolding (vk consts, SpecialKey emission, SAS mgmt API, modifier tracking, GDI frame-diff fields) - Cargo.lock: cargo pruned ~147 stale transitive entries (no version changes) Follow-up: add cargo clippy -D warnings to the build-agent CI job so the agent crate stays clippy-clean. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -10,7 +10,7 @@ mod raw;
|
||||
pub use raw::RawEncoder;
|
||||
|
||||
use crate::capture::CapturedFrame;
|
||||
use crate::proto::{DirtyRect as ProtoDirtyRect, RawFrame, VideoFrame};
|
||||
use crate::proto::VideoFrame;
|
||||
use anyhow::Result;
|
||||
|
||||
/// Encoded frame ready for transmission
|
||||
@@ -23,6 +23,8 @@ pub struct EncodedFrame {
|
||||
pub size: usize,
|
||||
|
||||
/// Whether this is a keyframe (full frame)
|
||||
// Set by encoders; not yet read by the transmit path.
|
||||
#[allow(dead_code)]
|
||||
pub is_keyframe: bool,
|
||||
}
|
||||
|
||||
@@ -32,9 +34,11 @@ pub trait Encoder: Send {
|
||||
fn encode(&mut self, frame: &CapturedFrame) -> Result<EncodedFrame>;
|
||||
|
||||
/// Request a keyframe on next encode
|
||||
#[allow(dead_code)]
|
||||
fn request_keyframe(&mut self);
|
||||
|
||||
/// Get encoder name/type
|
||||
#[allow(dead_code)]
|
||||
fn name(&self) -> &str;
|
||||
}
|
||||
|
||||
@@ -44,9 +48,7 @@ pub fn create_encoder(codec: &str, quality: u32) -> Result<Box<dyn Encoder>> {
|
||||
"raw" | "zstd" => Ok(Box::new(RawEncoder::new(quality)?)),
|
||||
// "vp9" => Ok(Box::new(Vp9Encoder::new(quality)?)),
|
||||
// "h264" => Ok(Box::new(H264Encoder::new(quality)?)),
|
||||
"auto" | _ => {
|
||||
// Default to raw for now (best for LAN)
|
||||
Ok(Box::new(RawEncoder::new(quality)?))
|
||||
}
|
||||
// "auto" and any unknown codec default to raw for now (best for LAN)
|
||||
_ => Ok(Box::new(RawEncoder::new(quality)?)),
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user