Skip to content

Commit

Permalink
clippy fixes in client and core
Browse files Browse the repository at this point in the history
Signed-off-by: clux <[email protected]>
  • Loading branch information
clux committed Oct 8, 2024
1 parent b789092 commit 664c71b
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 5 deletions.
3 changes: 0 additions & 3 deletions kube-client/src/api/core_methods.rs
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,6 @@ where
/// ```no_run
/// # use kube::Api;
/// use k8s_openapi::api::core::v1::Pod;
/// # async fn wrapper() -> Result<(), Box<dyn std::error::Error>> {
/// # let client: kube::Client = todo!();
/// let pods: Api<Pod> = Api::namespaced(client, "apps");
Expand Down Expand Up @@ -262,10 +261,8 @@ where
/// use kube::api::{Api, DeleteParams};
/// use k8s_openapi::apiextensions_apiserver::pkg::apis::apiextensions::v1 as apiexts;
/// use apiexts::CustomResourceDefinition;
/// # async fn wrapper() -> Result<(), Box<dyn std::error::Error>> {
/// # let client: kube::Client = todo!();
/// let crds: Api<CustomResourceDefinition> = Api::all(client);
/// crds.delete("foos.clux.dev", &DeleteParams::default()).await?
/// .map_left(|o| println!("Deleting CRD: {:?}", o.status))
Expand Down
2 changes: 1 addition & 1 deletion kube-core/src/duration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ impl<'de> Deserialize<'de> for Duration {
D: Deserializer<'de>,
{
struct Visitor;
impl<'de> de::Visitor<'de> for Visitor {
impl de::Visitor<'_> for Visitor {

Check warning on line 174 in kube-core/src/duration.rs

View check run for this annotation

Codecov / codecov/patch

kube-core/src/duration.rs#L174

Added line #L174 was not covered by tests
type Value = Duration;

fn expecting(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
Expand Down
1 change: 0 additions & 1 deletion kube-core/src/object.rs
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,6 @@ impl<T: Clone> ObjectList<T> {
/// *elem = 2;
/// println!("First element: {:?}", elem); // prints "First element: 2"
/// }
pub fn iter_mut(&mut self) -> impl Iterator<Item = &mut T> {
self.items.iter_mut()
}
Expand Down

0 comments on commit 664c71b

Please sign in to comment.