Skip to content

Commit

Permalink
Remove not needed DummyClipboardContext
Browse files Browse the repository at this point in the history
  • Loading branch information
mmiecz committed Jun 13, 2019
1 parent f4d972a commit 05a6495
Showing 1 changed file with 0 additions and 22 deletions.
22 changes: 0 additions & 22 deletions components/script/clipboard_provider.rs
Expand Up @@ -5,7 +5,6 @@
use embedder_traits::EmbedderMsg;
use ipc_channel::ipc::channel;
use script_traits::{ScriptMsg, ScriptToConstellationChan};
use std::borrow::ToOwned;

pub trait ClipboardProvider {
// blocking method to get the clipboard contents
Expand All @@ -30,24 +29,3 @@ impl ClipboardProvider for ScriptToConstellationChan {
.unwrap();
}
}

pub struct DummyClipboardContext {
content: String,
}

impl DummyClipboardContext {
pub fn new(s: &str) -> DummyClipboardContext {
DummyClipboardContext {
content: s.to_owned(),
}
}
}

impl ClipboardProvider for DummyClipboardContext {
fn clipboard_contents(&mut self) -> String {
self.content.clone()
}
fn set_clipboard_contents(&mut self, s: String) {
self.content = s;
}
}

0 comments on commit 05a6495

Please sign in to comment.