Skip to content
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 isuses on rust 1.72 #1288

Merged
merged 2 commits into from
Aug 24, 2023
Merged

Fix clippy isuses on rust 1.72 #1288

merged 2 commits into from
Aug 24, 2023

Conversation

clux
Copy link
Member

@clux clux commented Aug 24, 2023

resolver choice explicit

caused warning on regular cargo build:

warning: some crates are on edition 2021 which defaults to `resolver = "2"`, but virtual workspaces default to `resolver = "1"`
note: to keep the current resolver, specify `workspace.resolver = "1"` in the workspace root's manifest
note: to use the edition 2021 resolver, specify `workspace.resolver = "2"` in the workspace root's manifest

(we can't use resolver 2 atm due to the peer dependency on k8s-openapi and its features)

& without explicit lifetime

caused:

`&` without an explicit lifetime name cannot be used here
warning: `&` without an explicit lifetime name cannot be used here
   --> kube-client/src/client/auth/oidc.rs:155:28
    |
155 |     const CONFIG_ID_TOKEN: &str = "id-token";
    |                            ^
    |
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
    = note: for more information, see issue #115010 <https://github.com/rust-lang/rust/issues/115010>
    = note: `#[warn(elided_lifetimes_in_associated_constant)]` on by default
help: use the `'static` lifetime
    |
155 |     const CONFIG_ID_TOKEN: &'static str = "id-token";
    |                             +++++++

- resolver choice explicit
- & without explicit lifetime

Signed-off-by: clux <sszynrae@gmail.com>
Signed-off-by: clux <sszynrae@gmail.com>
@clux clux added the changelog-exclude changelog excluded prs label Aug 24, 2023
@clux clux added this to the 0.86.0 milestone Aug 24, 2023
@clux clux marked this pull request as ready for review August 24, 2023 18:58
@clux clux enabled auto-merge (squash) August 24, 2023 18:58
@codecov
Copy link

codecov bot commented Aug 24, 2023

Codecov Report

Merging #1288 (dc556e1) into main (9685bc1) will decrease coverage by 0.09%.
The diff coverage is n/a.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1288      +/-   ##
==========================================
- Coverage   72.27%   72.19%   -0.09%     
==========================================
  Files          75       75              
  Lines        6259     6258       -1     
==========================================
- Hits         4524     4518       -6     
- Misses       1735     1740       +5     
Files Changed Coverage Δ
kube-client/src/client/auth/oidc.rs 57.24% <ø> (+0.39%) ⬆️
kube/src/mock_tests.rs 97.87% <ø> (ø)

... and 2 files with indirect coverage changes

@clux clux requested review from Dav1dde and nightkr August 24, 2023 19:00
@clux clux merged commit 0a5fb72 into main Aug 24, 2023
17 checks passed
@clux clux deleted the clippy72 branch August 24, 2023 19:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog-exclude changelog excluded prs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants