mirror of
https://github.com/wez/wezterm.git
synced 2024-12-24 13:52:55 +03:00
maybe fixup compilation on macos and windows
This commit is contained in:
parent
9a2c7a1485
commit
c87a1c3b03
@ -469,7 +469,7 @@ impl WindowOps for Window {
|
||||
Future::result(
|
||||
clipboard::ClipboardContext::new()
|
||||
.and_then(|mut ctx| ctx.get_contents())
|
||||
.with_context(|| format!("Failed to get clipboard: {}", e)),
|
||||
.context("Failed to get clipboard"),
|
||||
)
|
||||
}
|
||||
|
||||
@ -478,7 +478,7 @@ impl WindowOps for Window {
|
||||
Future::result(
|
||||
clipboard::ClipboardContext::new()
|
||||
.and_then(|mut ctx| ctx.set_contents(text))
|
||||
.with_context(|| format!("Failed to set clipboard: {}", e)),
|
||||
.context("Failed to set clipboard"),
|
||||
)
|
||||
}
|
||||
}
|
||||
|
@ -8,6 +8,7 @@ use crate::{
|
||||
MouseEventKind, MousePress, Operator, PaintContext, Point, Rect, ScreenPoint, WindowCallbacks,
|
||||
WindowOps, WindowOpsMut,
|
||||
};
|
||||
use anyhow::{bail, Context};
|
||||
use promise::Future;
|
||||
use std::any::Any;
|
||||
use std::cell::RefCell;
|
||||
@ -423,7 +424,7 @@ impl WindowOps for Window {
|
||||
}
|
||||
|
||||
fn get_clipboard(&self) -> Future<String> {
|
||||
Future::result(clipboard_win::get_clipboard_string().context("Error getting clipboard: {}"))
|
||||
Future::result(clipboard_win::get_clipboard_string().context("Error getting clipboard"))
|
||||
}
|
||||
|
||||
fn set_clipboard(&self, text: String) -> Future<()> {
|
||||
|
Loading…
Reference in New Issue
Block a user