alamb commented on code in PR #2148:
URL: https://github.com/apache/arrow-rs/pull/2148#discussion_r928738265


##########
object_store/src/lib.rs:
##########
@@ -695,8 +695,8 @@ mod tests {
     #[tokio::test]
     async fn test_list_lifetimes() {
         let store = memory::InMemory::new();
-        let stream = list_store(&store, "path").await.unwrap();
-        assert_eq!(stream.count().await, 0);
+        let mut stream = list_store(&store, "path").await.unwrap();

Review Comment:
   I am not sure why, but locally the `stream.count()` construction started 
erroring like this for me:
   
   
   ```
   cd /Users/alamb/Software/arrow-rs2 && RUST_LOG=trace RUST_BACKTRACE=1 
CARGO_TARGET_DIR=/Users/alamb/Software/df-target2 cargo test -p object_store 
--features=aws,azure,azure_test,gcp
      Compiling object_store v0.3.0 
(/Users/alamb/Software/arrow-rs2/object_store)
   error[E0599]: `Pin<Box<dyn futures::Stream<Item = 
std::result::Result<ObjectMeta, Error>> + std::marker::Send>>` is not an 
iterator
      --> object_store/src/lib.rs:699:27
       |
   699 |         assert_eq!(stream.count().await, 0);
       |                           ^^^^^ `Pin<Box<dyn futures::Stream<Item = 
std::result::Result<ObjectMeta, Error>> + std::marker::Send>>` is not an 
iterator
       |
      ::: 
/Users/alamb/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/src/rust/library/core/src/pin.rs:408:1
       |
   408 | pub struct Pin<P> {
       | ----------------- doesn't satisfy `_: Iterator`
       |
      ::: 
/Users/alamb/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-core-0.3.17/src/stream.rs:27:1
       |
   27  | pub trait Stream {
       | ---------------- doesn't satisfy `_: Iterator`
       |
       = note: the following trait bounds were not satisfied:
               `Pin<Box<dyn futures::Stream<Item = 
std::result::Result<ObjectMeta, Error>> + std::marker::Send>>: Iterator`
               which is required by `&mut Pin<Box<dyn futures::Stream<Item = 
std::result::Result<ObjectMeta, Error>> + std::marker::Send>>: Iterator`
               `dyn futures::Stream<Item = std::result::Result<ObjectMeta, 
Error>> + std::marker::Send: Iterator`
               which is required by `&mut dyn futures::Stream<Item = 
std::result::Result<ObjectMeta, Error>> + std::marker::Send: Iterator`
   
   ```



-- 
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: github-unsubscr...@arrow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to