Skip to content

Fix Clippy in CI for Rust 1.87 release #7514

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

Merged
merged 4 commits into from
May 16, 2025
Merged

Conversation

alamb
Copy link
Contributor

@alamb alamb commented May 15, 2025

Which issue does this PR close?

Closes #.

Rationale for this change

Rust 1.87 was released today https://releases.rs/docs/1.87.0/ and with it some new clippy lints

Some new clippy failures now happen on main as a result, for example https://github.com/apache/arrow-rs/actions/runs/15054299671/job/42316440085

What changes are included in this PR?

  1. Run cargo update and fix all clippy errors

Are there any user-facing changes?

No, this is all internal changes

@github-actions github-actions bot added parquet Changes to the parquet crate arrow Changes to the arrow crate arrow-flight Changes to the arrow-flight crate labels May 15, 2025
@@ -485,6 +485,7 @@ impl<K: ArrowDictionaryKeyType> DictionaryArray<K> {

/// Returns `PrimitiveDictionaryBuilder` of this dictionary array for mutating
/// its keys and values if the underlying data buffer is not shared by others.
#[allow(clippy::result_large_err)]
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this API purposely returns self on failure, which is large. Thus I ignored the clippy lint

@@ -112,6 +112,7 @@ static TABLES: Lazy<Vec<&'static str>> = Lazy::new(|| vec!["flight_sql.example.t
pub struct FlightSqlServiceImpl {}

impl FlightSqlServiceImpl {
#[allow(clippy::result_large_err)]
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is an example and follows the example of tonic status

@@ -76,7 +76,7 @@ pub async fn run_scenario(host: &str, port: u16) -> Result {
Ok(())
}

#[allow(clippy::unnecessary_wraps)]
#[allow(clippy::result_large_err)]
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems the previous lint has been fixed but now I need to add a new allow

@@ -702,24 +702,21 @@ mod lz4_hadoop_codec {
input_len -= PREFIX_LEN;

if input_len < expected_compressed_size as usize {
return Err(io::Error::new(
io::ErrorKind::Other,
return Err(io::Error::other(
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clippy told me to do this

Copy link
Contributor

@crepererum crepererum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank you

@crepererum crepererum merged commit 847534d into apache:main May 16, 2025
28 checks passed
@alamb
Copy link
Contributor Author

alamb commented May 16, 2025

Thank you for the review @crepererum

@alamb alamb deleted the alamb/clippy_1.87 branch May 16, 2025 14:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
arrow Changes to the arrow crate arrow-flight Changes to the arrow-flight crate parquet Changes to the parquet crate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants