We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent de54253 commit bb78e83Copy full SHA for bb78e83
src/clipboard/wayland.rs
@@ -111,10 +111,12 @@ fn paste_wayland(cfg: PasteConfig) -> Result<()> {
111
return Ok(());
112
}
113
114
- let mime_type = CString::new(decide_mime_type(
115
- &state.config.expected_mime_type,
116
- supported_types,
117
- )?)?;
+ let mime_type =
+ if let Ok(type_str) = decide_mime_type(&state.config.expected_mime_type, supported_types) {
+ CString::new(type_str)?
+ } else {
118
+ return Ok(());
119
+ };
120
121
// offer.receive needs a fd to write, we cannot use the stdin since the read side of the
122
// pipe may close earlier before all data written.
0 commit comments