From a22780feb63945bd549735e17b48074b4d7b1419 Mon Sep 17 00:00:00 2001 From: Wez Furlong Date: Sat, 18 Jan 2020 16:17:13 -0800 Subject: Restore deleted Send impl Heh, I removed this by accident at the last minute before submitting the PR to the CI... restore it! --- src/session.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/session.rs b/src/session.rs index 90a0333..442deaa 100644 --- a/src/session.rs +++ b/src/session.rs @@ -68,6 +68,11 @@ pub(crate) struct SessionInner { tcp: Option, } +// The compiler doesn't know that it is Send safe because of the raw +// pointer inside. We know that the way that it is used by libssh2 +// and this crate is Send safe. +unsafe impl Send for SessionInner {} + /// An SSH session, typically representing one TCP connection. /// /// All other structures are based on an SSH session and cannot outlive a -- cgit v1.2.3