-
Notifications
You must be signed in to change notification settings - Fork 829
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix Clippy for the Rust 1.80 release #6116
Changes from all commits
c2c6b51
2014d72
cf68b8e
be110e0
20847f1
f231968
9c7844f
d888afb
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -66,7 +66,7 @@ use super::ByteArrayType; | |
/// * Strings with length <= 12 are stored directly in the view. | ||
/// | ||
/// * Strings with length > 12: The first four bytes are stored inline in the | ||
/// view and the entire string is stored in one of the buffers. | ||
/// view and the entire string is stored in one of the buffers. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. A new clippy lint requires items in docs to be properly indented |
||
/// | ||
/// Unlike [`GenericByteArray`], there are no constraints on the offsets other | ||
/// than they must point into a valid buffer. However, they can be out of order, | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -376,70 +376,6 @@ mod tests { | |
.expect("All null array has valid array data"); | ||
} | ||
|
||
#[cfg(feature = "test_utils")] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. clippy flagged the fact that this crate doesn't have the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This code also doesn't compile even when I added a |
||
#[test] | ||
fn bad_size_collect_string() { | ||
use crate::util::test_util::BadIterator; | ||
let data = vec![Some("foo"), None, Some("bar")]; | ||
let expected: StringArray = data.clone().into_iter().collect(); | ||
|
||
// Iterator reports too many items | ||
let arr: StringArray = BadIterator::new(3, 10, data.clone()).collect(); | ||
assert_eq!(expected, arr); | ||
|
||
// Iterator reports too few items | ||
let arr: StringArray = BadIterator::new(3, 1, data.clone()).collect(); | ||
assert_eq!(expected, arr); | ||
} | ||
|
||
#[cfg(feature = "test_utils")] | ||
#[test] | ||
fn bad_size_collect_large_string() { | ||
use crate::util::test_util::BadIterator; | ||
let data = vec![Some("foo"), None, Some("bar")]; | ||
let expected: LargeStringArray = data.clone().into_iter().collect(); | ||
|
||
// Iterator reports too many items | ||
let arr: LargeStringArray = BadIterator::new(3, 10, data.clone()).collect(); | ||
assert_eq!(expected, arr); | ||
|
||
// Iterator reports too few items | ||
let arr: LargeStringArray = BadIterator::new(3, 1, data.clone()).collect(); | ||
assert_eq!(expected, arr); | ||
} | ||
|
||
#[cfg(feature = "test_utils")] | ||
#[test] | ||
fn bad_size_iter_values_string() { | ||
use crate::util::test_util::BadIterator; | ||
let data = vec!["foo", "bar", "baz"]; | ||
let expected: StringArray = data.clone().into_iter().map(Some).collect(); | ||
|
||
// Iterator reports too many items | ||
let arr = StringArray::from_iter_values(BadIterator::new(3, 10, data.clone())); | ||
assert_eq!(expected, arr); | ||
|
||
// Iterator reports too few items | ||
let arr = StringArray::from_iter_values(BadIterator::new(3, 1, data.clone())); | ||
assert_eq!(expected, arr); | ||
} | ||
|
||
#[cfg(feature = "test_utils")] | ||
#[test] | ||
fn bad_size_iter_values_large_string() { | ||
use crate::util::test_util::BadIterator; | ||
let data = vec!["foo", "bar", "baz"]; | ||
let expected: LargeStringArray = data.clone().into_iter().map(Some).collect(); | ||
|
||
// Iterator reports too many items | ||
let arr = LargeStringArray::from_iter_values(BadIterator::new(3, 10, data.clone())); | ||
assert_eq!(expected, arr); | ||
|
||
// Iterator reports too few items | ||
let arr = LargeStringArray::from_iter_values(BadIterator::new(3, 1, data.clone())); | ||
assert_eq!(expected, arr); | ||
} | ||
|
||
fn _test_generic_string_array_from_list_array<O: OffsetSizeTrait>() { | ||
let values = b"HelloArrowAndParquet"; | ||
// "ArrowAndParquet" | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -75,7 +75,7 @@ pyarrow = ["pyo3", "ffi"] | |
# force_validate runs full data validation for all arrays that are created | ||
# this is not enabled by default as it is too computationally expensive | ||
# but is run as part of our CI checks | ||
force_validate = ["arrow-data/force_validate"] | ||
force_validate = ["arrow-array/force_validate", "arrow-data/force_validate"] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was code in |
||
# Enable ffi support | ||
ffi = ["arrow-schema/ffi", "arrow-data/ffi", "arrow-array/ffi"] | ||
chrono-tz = ["arrow-array/chrono-tz"] | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this crate has code that is flagged behind force_validate but it was not a crate feature
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
checked cfg is really useful!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
100% agree