alacritty / alacritty/copypasta

if target_os = "emscripten" ClipboardContext is not defined and not set to NopClipboardContext;

未關閉
#82 1 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
主要語言
Rust
星號
350
分支
39
PR 合併指標
30 天內沒有已合併 PR

描述

I would be fine for it getting set to Nop, getting the clipboard works very differently in wasm/emscripten and very much out of this scope having to cross the JS/FFI boundary without web-sys available and getting navigator.clipboard.

But, it doesnt get defined at all and that makes the compiler unhappy.

#[cfg(not(any(
unix,
windows,
target_os = "macos",
target_os = "android",
target_os = "ios",
target_os = "emscripten"
)))]
pub type ClipboardContext = nop_clipboard::NopClipboardContext;

I think the condition is mixed up here.

Add this before please (under the TODOs for android and ios)
#[cfg(target_os = "emscripten")]
pub type ClipboardContext = nop_clipboard::NopClipboardContext;

貢獻指南

這個儲存庫沒有索引到貢獻指南

評估

這個 Issue 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。