Update window_clipboard to 0.2
This commit is contained in:
parent
bbca5c4bde
commit
b22b0dd7ff
6 changed files with 11 additions and 9 deletions
|
|
@ -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>;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue