Skip to content

Commit

Permalink
Fix clippy isuses on rust 1.72 (#1288)
Browse files Browse the repository at this point in the history
* Fix clippy isuses on rust 1.72

- resolver choice explicit
- & without explicit lifetime

Signed-off-by: clux <[email protected]>

* fmt..

Signed-off-by: clux <[email protected]>

---------

Signed-off-by: clux <[email protected]>
  • Loading branch information
clux authored Aug 24, 2023
1 parent 9685bc1 commit 0a5fb72
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
[workspace]
default-members = ["kube"]
resolver = "1"
members = [
"kube",
"kube-client",
Expand Down
10 changes: 5 additions & 5 deletions kube-client/src/client/auth/oidc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ pub struct Oidc {

impl Oidc {
/// Config key for the ID token.
const CONFIG_ID_TOKEN: &str = "id-token";
const CONFIG_ID_TOKEN: &'static str = "id-token";
/// How many seconds before ID token expiration we want to refresh it.
const EXPIRY_DELTA_SECONDS: i64 = 10;

Expand Down Expand Up @@ -278,13 +278,13 @@ struct Refresher {

impl Refresher {
/// Config key for the client ID.
const CONFIG_CLIENT_ID: &str = "client-id";
const CONFIG_CLIENT_ID: &'static str = "client-id";
/// Config key for the client secret.
const CONFIG_CLIENT_SECRET: &str = "client-secret";
const CONFIG_CLIENT_SECRET: &'static str = "client-secret";
/// Config key for the issuer url.
const CONFIG_ISSUER_URL: &str = "idp-issuer-url";
const CONFIG_ISSUER_URL: &'static str = "idp-issuer-url";
/// Config key for the refresh token.
const CONFIG_REFRESH_TOKEN: &str = "refresh-token";
const CONFIG_REFRESH_TOKEN: &'static str = "refresh-token";

/// Create a new instance of this struct from the provider config.
fn from_config(config: &HashMap<String, String>) -> Result<Self, errors::RefreshInitError> {
Expand Down
2 changes: 1 addition & 1 deletion kube/src/mock_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use crate::{
use anyhow::Result;
use futures::{poll, StreamExt, TryStreamExt};
use http::{Request, Response};
use hyper::{body::to_bytes, Body};
use hyper::Body;
use kube_derive::CustomResource;
use schemars::JsonSchema;
use serde::{Deserialize, Serialize};
Expand Down

0 comments on commit 0a5fb72

Please sign in to comment.