Xuanwo

Results 1639 comments of Xuanwo

Every binding should maintain it's own full document which provide all possible input of config options. (we need some way/tool to automate this job) Besides, we can build a user...

Hi, what's the status of this pr?

> I believe it's more like an issue of Tokio's implementation, which doesn't pass the write error on to the user. I believe it's more like an issue of Tokio's...

During implement https://github.com/tokio-rs/tokio/pull/6330, I found that tokio will clear the buffer while error happened during write. https://github.com/tokio-rs/tokio/blob/28d88cc35902a0489e9b0781a47f9f5713a01673/tokio/src/io/blocking.rs#L258-L265 I'm guessing we need to maintain the internal states here instead of droping...

The current implementation causes `into_std` to break: ```rust pub async fn into_std(mut self) -> StdFile { self.inner.get_mut().complete_inflight().await; Arc::try_unwrap(self.std).expect("Arc::try_unwrap failed") } ``` I'm still finding a way to address it.

> `write_to_partial` will return if the buffer is empty. But I don't see how the contents of the buffer is preserved in case of the `write_all` failure. Can you elaborate...

> For the most part, a `tokio::fs::File` should have similar behavior to a `BufWriter`. What does a `BufWriter` do on error? BufWrtier will return error during `flush`: ```rust let mut...

> It sounds like the solution is to only clear the amount of data that was written (or keep a cursor), then return the error from flush. The caller can...