Update window_clipboard to 0.2

This commit is contained in:
Héctor Ramón Jiménez 2021-03-10 01:16:26 +01:00
parent bbca5c4bde
commit b22b0dd7ff
6 changed files with 11 additions and 9 deletions

View file

@ -1,6 +1,6 @@
/// A buffer for short-term storage and transfer within and between
/// applications.
pub trait Clipboard {
/// Returns the current content of the [`Clipboard`] as text.
fn content(&self) -> Option<String>;
/// Reads the current content of the [`Clipboard`] as text.
fn read(&self) -> Option<String>;
}

View file

@ -509,7 +509,7 @@ where
Some(content) => content,
None => {
let content: String = clipboard
.content()
.read()
.unwrap_or(String::new())
.chars()
.filter(|c| !c.is_control())