From 908259663de60ae62723a73c3e93159c4bd22586 Mon Sep 17 00:00:00 2001 From: Kai Mast Date: Thu, 27 Jan 2022 11:27:12 -0600 Subject: Remove wasm-specific clipboard --- winit/src/clipboard.rs | 28 +--------------------------- 1 file changed, 1 insertion(+), 27 deletions(-) (limited to 'winit/src/clipboard.rs') diff --git a/winit/src/clipboard.rs b/winit/src/clipboard.rs index 197d32b3..559b3521 100644 --- a/winit/src/clipboard.rs +++ b/winit/src/clipboard.rs @@ -3,43 +3,17 @@ pub use iced_native::clipboard::Action; use crate::command::{self, Command}; -/// A buffer for short-term storage and transfer within and between -/// applications. +#[allow(missing_docs)] #[allow(missing_debug_implementations)] -#[cfg(target_arch = "wasm32")] -pub struct Clipboard; - -#[cfg(target_arch = "wasm32")] -impl Clipboard { - /// Creates a new [`Clipboard`] for the given window. - pub fn connect(_window: &winit::window::Window) -> Clipboard { - Clipboard - } - - /// Reads the current content of the [`Clipboard`] as text. - pub fn read(&self) -> Option { - None - } - - /// Writes the given text contents to the [`Clipboard`]. - pub fn write(&mut self, _contents: String) {} -} - -/// A buffer for short-term storage and transfer within and between -/// applications. -#[allow(missing_debug_implementations)] -#[cfg(not(target_arch = "wasm32"))] pub struct Clipboard { state: State, } -#[cfg(not(target_arch = "wasm32"))] enum State { Connected(window_clipboard::Clipboard), Unavailable, } -#[cfg(not(target_arch = "wasm32"))] impl Clipboard { /// Creates a new [`Clipboard`] for the given window. pub fn connect(window: &winit::window::Window) -> Clipboard { -- cgit