Xuanwo commented on code in PR #176: URL: https://github.com/apache/iceberg-rust/pull/176#discussion_r1492439815
########## crates/iceberg/src/io.rs: ########## @@ -240,9 +241,9 @@ impl InputFile { } /// Trait for writing file. -pub trait FileWrite: AsyncWrite {} +pub trait FileWrite: AsyncWrite + TokioAsyncWrite + Send + Unpin {} Review Comment: > Can we remove the futures::AsyncWrite? Since for now, we don't need it. That's fine to remove `futures::AsyncWrite` here if not needed. But I want to mention that using `AsyncWrite` is more friendly for users who don't want to depend on `TokioAsyncWrite` and there are `async_compat` crate to transform a `futures::AsyncWrite` to `TokioAsyncWrite`. Maybe we can add our own trait to support both of them? I believe this is another issue and should not be part of this PR. ########## crates/iceberg/src/io.rs: ########## @@ -240,9 +241,9 @@ impl InputFile { } /// Trait for writing file. -pub trait FileWrite: AsyncWrite {} +pub trait FileWrite: AsyncWrite + TokioAsyncWrite + Send + Unpin {} Review Comment: > Can we remove the futures::AsyncWrite? Since for now, we don't need it. That's fine to remove `futures::AsyncWrite` here if not needed. But I want to mention that using `AsyncWrite` is more friendly for users who don't want to depend on `TokioAsyncWrite` and there are `async_compat` crate to transform a `futures::AsyncWrite` to `TokioAsyncWrite`. --- Maybe we can add our own trait to support both of them? I believe this is another issue and should not be part of this PR. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For additional commands, e-mail: issues-h...@iceberg.apache.org