Skip to content

Commit

Permalink
clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
russelltg committed Oct 13, 2024
1 parent ee5fde0 commit 250d536
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 12 deletions.
2 changes: 1 addition & 1 deletion src/cap_ext_image_copy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ impl Dispatch<ExtImageCopyCaptureSessionV1, ()> for State<CapExtImageCopy> {
let probed = if let ExtImageCopyState::Probing(formats, size, dev) =
&state.enc.unwrap_cap().state
{
Some((formats.clone(), size.clone(), dev.clone()))
Some((formats.clone(), size, dev.clone()))
} else {
None
};
Expand Down
2 changes: 1 addition & 1 deletion src/cap_wlr_screencopy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ impl CaptureSource for CapWlrScreencopy {

// if this doesn't exist, it will get logged later anyways
let _ = gm.bind::<WpDrmLeaseDeviceV1, _, _>(
&eq,
eq,
WpDrmLeaseDeviceV1::interface().version..=WpDrmLeaseDeviceV1::interface().version,
(),
);
Expand Down
14 changes: 4 additions & 10 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1440,16 +1440,10 @@ impl EncState {
DrmFourcc::Xbgr8888,
DrmFourcc::Xrgb2101010,
] {
let is_fmt_supported = capture_formats
.iter()
.find(|p| {
p.fourcc == DrmFourcc::Xrgb8888
&& p.modifiers
.iter()
.find(|m| **m == DrmModifier::LINEAR)
.is_some()
})
.is_some();
let is_fmt_supported = capture_formats.iter().any(|p| {
p.fourcc == DrmFourcc::Xrgb8888
&& p.modifiers.iter().any(|m| *m == DrmModifier::LINEAR)
});

if is_fmt_supported {
selected_format = Some(DmabufFormat {
Expand Down

0 comments on commit 250d536

Please sign in to comment.