alexcrichton / ssh2-rs

Rust bindings for libssh2
https://docs.rs/ssh2
Apache License 2.0
467 stars 142 forks source link

Consider modifying parameters for this method : channel::request_pty_size() #304

Closed JiKai126 closed 9 months ago

JiKai126 commented 9 months ago

This is the current version:

pub fn request_pty_size(
        &mut self,
        width: u32,
        height: u32,
        width_px: Option<u32>,
        height_px: Option<u32>,
    ) -> Result<(), Error> 

I would like to modify this code to look like the following:

pub fn request_pty_size<W>(
        &mut W,
        width: u32,
        height: u32,
        width_px: Option<u32>,
        height_px: Option<u32>,
    )  
where
    W: Write

Because I'm using fn split(self) -> (ReadHalf<Self>, WriteHalf<Self>),I can not to use request_pty_size

yodaldevoid commented 9 months ago

I'm not sure how your suggested code would work. Beyond that, I cannot find a split method or function in ssh2 or ReadHalf or WriteHalf structures. Perhaps you are mixing up code from this library and another?

JiKai126 commented 9 months ago

I'm sorry, this issue shouldn't be related to this library.