on master help sign in
fix warnings
b63afbeShafkath Shuhan
helix-view/src/clipboard.rs+3−1
@@ -152,6 +152,8 @@ mod provider {
152 }
152 }
153
153
154 impl NopProvider {
154 impl NopProvider {
155+ #[allow(dead_code)]
156+ // Only dead_code on Windows.
155 pub fn new() -> Self {
157 pub fn new() -> Self {
156 Self {
158 Self {
157 buf: String::new(),
159 buf: String::new(),
@@ -217,7 +219,7 @@ mod provider {
217 fn set_contents(&mut self, contents: String, clipboard_type: ClipboardType) -> Result<()> {
219 fn set_contents(&mut self, contents: String, clipboard_type: ClipboardType) -> Result<()> {
218 match clipboard_type {
220 match clipboard_type {
219 ClipboardType::Clipboard => {
221 ClipboardType::Clipboard => {
220− clipboard_win::set_clipboard(clipboard_win::formats::Unicode, contents);
222+ clipboard_win::set_clipboard(clipboard_win::formats::Unicode, contents)?;
221 }
223 }
222 ClipboardType::Selection => {}
224 ClipboardType::Selection => {}
223 };
225 };