You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "rtyler (via GitHub)" <gi...@apache.org> on 2024/08/21 19:29:08 UTC

[PR] fix reference in doctest to size_of which is not imported by default [arrow-rs]

rtyler opened a new pull request, #6286:
URL: https://github.com/apache/arrow-rs/pull/6286

   This corrects an issue with this doctest noticed on FreeBSD/amd64 with rustc 1.77.1
   
   ```
   11:01:41     Doc-tests arrow_data
   11:01:41  
   11:01:41  running 2 tests
   11:01:41  test arrow-data/src/transform/mod.rs - transform::MutableArrayData (line 107) ... FAILED
   11:01:41  test arrow-data/src/ffi.rs - ffi::FFI_ArrowArray (line 30) ... ok
   11:01:41  
   11:01:41  failures:
   11:01:41  
   11:01:41  ---- arrow-data/src/transform/mod.rs - transform::MutableArrayData (line 107) stdout ----
   11:01:41  error[E0425]: cannot find function `size_of` in this scope
   11:01:41    --> arrow-data/src/transform/mod.rs:119:20
   11:01:41     |
   11:01:41  15 | let capacity = 3 * size_of::<i32>();
   11:01:41     |                    ^^^^^^^ not found in this scope
   11:01:41     |
   11:01:41  help: consider importing one of these items
   11:01:41     |
   11:01:41  2  + use core::mem::size_of;
   11:01:41     |
   11:01:41  2  + use std::mem::size_of;
   11:01:41     |
   11:01:41  
   11:01:41  error: aborting due to 1 previous error
   11:01:41  
   11:01:41  For more information about this error, try `rustc --explain E0425`.
   11:01:41  Couldn't compile the test.
   11:01:41  
   11:01:41  failures:
   11:01:41      arrow-data/src/transform/mod.rs - transform::MutableArrayData (line 107)
   ```


-- 
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-unsubscribe@arrow.apache.org

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


Re: [PR] fix reference in doctest to size_of which is not imported by default [arrow-rs]

Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb merged PR #6286:
URL: https://github.com/apache/arrow-rs/pull/6286


-- 
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-unsubscribe@arrow.apache.org

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


Re: [PR] fix reference in doctest to size_of which is not imported by default [arrow-rs]

Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb commented on PR #6286:
URL: https://github.com/apache/arrow-rs/pull/6286#issuecomment-2302940960

   Thanks @rtyler  -- I think std::mem::size_of became part of the std prelude somewhere along the way in later versions of rust, but for older versions it is still needed 👍 


-- 
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-unsubscribe@arrow.apache.org

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