Skip to content

Commit

Permalink
nightly fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
clux committed Jan 2, 2021
1 parent b8cf11f commit 9871f97
Show file tree
Hide file tree
Showing 9 changed files with 14 additions and 22 deletions.
3 changes: 1 addition & 2 deletions examples/pod_attach.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#[macro_use]
extern crate log;
#[macro_use] extern crate log;

use std::io::Write;

Expand Down
3 changes: 1 addition & 2 deletions examples/pod_exec.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#[macro_use]
extern crate log;
#[macro_use] extern crate log;

use futures::{StreamExt, TryStreamExt};
use k8s_openapi::api::core::v1::Pod;
Expand Down
3 changes: 1 addition & 2 deletions examples/pod_shell.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#[macro_use]
extern crate log;
#[macro_use] extern crate log;

use futures::{StreamExt, TryStreamExt};
use k8s_openapi::api::core::v1::Pod;
Expand Down
6 changes: 2 additions & 4 deletions kube/src/api/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,8 @@ pub use typed::Api;
mod dynamic;
pub use dynamic::DynamicResource;

#[cfg(feature = "ws")]
mod remote_command;
#[cfg(feature = "ws")]
pub use remote_command::AttachedProcess;
#[cfg(feature = "ws")] mod remote_command;
#[cfg(feature = "ws")] pub use remote_command::AttachedProcess;

mod subresource;
#[cfg(feature = "ws")]
Expand Down
3 changes: 1 addition & 2 deletions kube/src/api/remote_command.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
use std::{
future::Future,
pin::Pin,
sync::Arc,
sync::Mutex,
sync::{Arc, Mutex},
task::{Context, Poll, Waker},
};

Expand Down
3 changes: 1 addition & 2 deletions kube/src/api/subresource.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ use crate::{

pub use k8s_openapi::api::autoscaling::v1::{Scale, ScaleSpec, ScaleStatus};

#[cfg(feature = "ws")]
use crate::api::remote_command::AttachedProcess;
#[cfg(feature = "ws")] use crate::api::remote_command::AttachedProcess;

/// Methods for [scale subresource](https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/#scale-subresource).
impl<K> Api<K>
Expand Down
7 changes: 3 additions & 4 deletions kube/src/client/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,8 @@ use crate::{
Error, Result,
};

#[cfg(feature = "ws")]
mod ws;
#[cfg(feature = "ws")]
use ws::AsyncTlsConnector;
#[cfg(feature = "ws")] mod ws;
#[cfg(feature = "ws")] use ws::AsyncTlsConnector;

#[cfg(feature = "ws")]
use async_tungstenite::{
Expand Down Expand Up @@ -441,6 +439,7 @@ impl TryFrom<Config> for Client {

impl TryFrom<Config> for reqwest::ClientBuilder {
type Error = Error;

fn try_from(config: Config) -> Result<Self> {
let mut builder = Self::new();

Expand Down
5 changes: 3 additions & 2 deletions kube/src/client/ws.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ mod tls {

impl TryFrom<Config> for AsyncTlsConnector {
type Error = Error;

fn try_from(config: Config) -> Result<Self> {
let mut builder = TlsConnector::builder();
if let Some((identity, identity_password)) = config.identity.as_ref() {
Expand All @@ -38,8 +39,7 @@ mod tls {

#[cfg(feature = "ws-rustls-tls")]
mod tls {
use std::convert::TryFrom;
use std::sync::Arc;
use std::{convert::TryFrom, sync::Arc};

use tokio_rustls::rustls::{self, Certificate, ClientConfig};
pub use tokio_rustls::TlsConnector as AsyncTlsConnector;
Expand All @@ -48,6 +48,7 @@ mod tls {

impl TryFrom<Config> for AsyncTlsConnector {
type Error = Error;

fn try_from(config: Config) -> Result<Self> {
use rustls::internal::pemfile;
use std::io::Cursor;
Expand Down
3 changes: 1 addition & 2 deletions kube/src/config/file_loader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ use super::{
};
use crate::{error::ConfigError, Result};

#[cfg(feature = "rustls-tls")]
use crate::Error;
#[cfg(feature = "rustls-tls")] use crate::Error;

/// KubeConfigOptions stores options used when loading kubeconfig file.
#[derive(Default, Clone)]
Expand Down

0 comments on commit 9871f97

Please sign in to comment.