Skip to content

chore: make clippy happy#15169

Closed
0xMars42 wants to merge 1 commit into
foundry-rs:masterfrom
0xMars42:chore/clippy-const-fn
Closed

chore: make clippy happy#15169
0xMars42 wants to merge 1 commit into
foundry-rs:masterfrom
0xMars42:chore/clippy-const-fn

Conversation

@0xMars42

Copy link
Copy Markdown
Contributor

The clippy CI job (cargo clippy --workspace --all-targets --all-features --locked with -Dwarnings, nightly) fails on the current nightly: clippy now flags two functions as missing_const_for_fn.

  • foundry_common::calc::median_sorted (crates/common/src/calc.rs)
  • State::has_indented_parent_chain (crates/fmt/src/state/mod.rs)

Make both const, as clippy suggests. No behavior change.

The latest nightly clippy flags median_sorted and
has_indented_parent_chain as missing_const_for_fn. Make them const to
unblock the clippy CI job (cargo clippy --workspace --all-targets
--all-features with -Dwarnings).

@stevencartavia stevencartavia left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

i already opened a PR for this, thanks
#15168

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants