diff --git a/Cargo.toml b/Cargo.toml index 0af34b967..cbe1fdbb1 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -49,9 +49,9 @@ signal-hook = { version = "0.3", optional = true, default-features = false } termios = { version = "0.3.3", optional = true } [target.'cfg(windows)'.dependencies] -winapi = { version = "0.3", features = ["consoleapi", "handleapi", "synchapi", "minwindef", "processenv", "std", "winbase", "wincon", "winuser"] } +winapi = { version = "0.3", features = ["consoleapi", "handleapi", "synchapi", "minwindef", "processenv", "std", "winbase", "wincon", "winerror", "winuser"] } scopeguard = "1.1" -clipboard-win = "4.5" +clipboard-win = "5.0" [dev-dependencies] doc-comment = "0.3" diff --git a/src/error.rs b/src/error.rs index 0e2895f61..ee7ea1c81 100644 --- a/src/error.rs +++ b/src/error.rs @@ -28,7 +28,7 @@ pub enum ReadlineError { Decode(char::DecodeUtf16Error), /// Something went wrong calling a Windows API #[cfg(windows)] - SystemError(clipboard_win::SystemError), + SystemError(clipboard_win::ErrorCode), /// Error related to SQLite history backend #[cfg(feature = "with-sqlite-history")] SQLiteError(rusqlite::Error), @@ -133,8 +133,8 @@ impl From for ReadlineError { } #[cfg(windows)] -impl From for ReadlineError { - fn from(err: clipboard_win::SystemError) -> Self { +impl From for ReadlineError { + fn from(err: clipboard_win::ErrorCode) -> Self { ReadlineError::SystemError(err) } }