Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions src/clipboard/wayland.rs
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,12 @@ fn paste_wayland(cfg: PasteConfig) -> Result<()> {
return Ok(());
}

let mime_type = CString::new(decide_mime_type(
&state.config.expected_mime_type,
supported_types,
)?)?;
let mime_type =
if let Ok(type_str) = decide_mime_type(&state.config.expected_mime_type, supported_types) {
Copy link

Copilot AI May 20, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider adding a brief comment explaining that returning Ok() when the mime type is not found is intentional behavior as per the PR requirements.

Copilot uses AI. Check for mistakes.
CString::new(type_str)?
} else {
return Ok(());
};

// offer.receive needs a fd to write, we cannot use the stdin since the read side of the
// pipe may close earlier before all data written.
Expand Down
Loading