From 7cdf06e2be91159694d39697a41d58abb0e564e9 Mon Sep 17 00:00:00 2001 From: Joe Wilm Date: Sat, 24 Dec 2016 18:08:46 -0500 Subject: Implement copypasta::Store for macOS pasteboard Only works with strings, currently. --- copypasta/src/lib.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'copypasta/src/lib.rs') diff --git a/copypasta/src/lib.rs b/copypasta/src/lib.rs index 9fe354f6..b498e2e9 100644 --- a/copypasta/src/lib.rs +++ b/copypasta/src/lib.rs @@ -32,10 +32,12 @@ pub trait Load : Sized { /// order to load the contents from other applications. pub trait Store : Load { /// Sets the primary clipboard contents - fn store_primary(&mut self, contents: String) -> Result<(), Self::Err>; + fn store_primary(&mut self, contents: S) -> Result<(), Self::Err> + where S: Into; /// Sets the secondary clipboard contents - fn store_selection(&mut self, contents: String) -> Result<(), Self::Err>; + fn store_selection(&mut self, contents: S) -> Result<(), Self::Err> + where S: Into; } #[cfg(target_os = "linux")] -- cgit