Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions russh/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,6 @@ tokio = { workspace = true, features = [
] }
rand.workspace = true
shell-escape = "0.1"
tokio-fd = "0.3"
termion = "4"
ratatui = "0.30"
tempfile = "3.14.0"

Expand All @@ -144,6 +142,10 @@ russh-sftp = "2.1.0"
tokio.workspace = true
tokio-stream.workspace = true

[target.'cfg(not(target_os = "windows"))'.dev-dependencies]
tokio-fd = "0.3"
termion = "4"

[package.metadata.docs.rs]
all-features = true

Expand Down
2 changes: 1 addition & 1 deletion russh/src/auth.rs
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ pub enum AgentAuthError {
}

#[cfg_attr(feature = "async-trait", async_trait::async_trait)]
impl<R: AsyncRead + AsyncWrite + Unpin + Send + 'static> Signer
impl<R: AsyncRead + AsyncWrite + Unpin + Send> Signer
for crate::keys::agent::client::AgentClient<R>
{
type Error = AgentAuthError;
Expand Down
12 changes: 9 additions & 3 deletions russh/src/keys/agent/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,23 @@ pub struct AgentClient<S: AgentStream> {
buf: Vec<u8>,
}

impl<S: AgentStream + Send + Unpin + 'static> AgentClient<S> {
impl<S: AgentStream + Send + Unpin> AgentClient<S> {
/// Wraps the internal stream in a Box<dyn _>, allowing different client
/// implementations to have the same type
pub fn dynamic(self) -> AgentClient<Box<dyn AgentStream + Send + Unpin + 'static>> {
pub fn dynamic<'a>(self) -> AgentClient<Box<dyn AgentStream + Send + Unpin + 'a>>
where
S: 'a,
{
AgentClient {
stream: Box::new(self.stream),
buf: self.buf,
}
}

pub fn into_inner(self) -> Box<dyn AgentStream + Send + Unpin + 'static> {
pub fn into_inner<'a>(self) -> Box<dyn AgentStream + Send + Unpin + 'a>
where
S: 'a,
{
Box::new(self.stream)
}
}
Expand Down
Loading