Skip to content

Commit

Permalink
Clippy warns now about unused 'use' statements
Browse files Browse the repository at this point in the history
Cleanup the warnings so we can see the important stuff.

Signed-off-by: Mark Anderson <mark@chef.io>
  • Loading branch information
markan committed Aug 13, 2020
1 parent 1fd95fb commit f55e474
Show file tree
Hide file tree
Showing 50 changed files with 3 additions and 113 deletions.
3 changes: 0 additions & 3 deletions components/artifactory-client/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@ use std::{collections::HashMap,
fmt,
io};

use builder_core;
use reqwest;

pub type ArtifactoryResult<T> = Result<T, ArtifactoryError>;

#[derive(Debug)]
Expand Down
2 changes: 0 additions & 2 deletions components/builder-api/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ use std::{env,
option::IntoIter,
path::PathBuf};

use num_cpus;

use artifactory_client::config::ArtifactoryCfg;
use github_api_client::config::GitHubCfg;
use oauth_client::config::OAuth2Cfg;
Expand Down
7 changes: 2 additions & 5 deletions components/builder-api/src/server/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,11 @@ use actix_web::{self,
HttpResponse,
ResponseError};
use artifactory_client::error::ArtifactoryError;
use diesel;
use github_api_client::HubError;
use oauth_client::error::Error as OAuthError;
use protobuf;
use reqwest;

use rusoto_core::RusotoError;
use rusoto_s3;
use serde_json;

use std::{fmt,
fs,
io,
Expand Down
2 changes: 0 additions & 2 deletions components/builder-api/src/server/framework/middleware.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,7 @@ use futures::future::{ok,
Either,
Future};

use base64;
use oauth_client::types::OAuth2User;
use protobuf;

use crate::bldr_core::{self,
access_token::{BUILDER_ACCOUNT_ID,
Expand Down
1 change: 0 additions & 1 deletion components/builder-api/src/server/helpers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ use actix_web::{http::header,
HttpRequest};
use regex::Regex;
use serde::Serialize;
use serde_json;
use std::str::FromStr;

// TODO - this module should not just be a grab bag of stuff
Expand Down
1 change: 0 additions & 1 deletion components/builder-api/src/server/resources/channels.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ use diesel::{pg::PgConnection,
result::{DatabaseErrorKind,
Error::{DatabaseError,
NotFound}}};
use serde_json;

use crate::{bldr_core::metrics::CounterMetric,
hab_core::{package::{PackageIdent,
Expand Down
2 changes: 0 additions & 2 deletions components/builder-api/src/server/resources/ext.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ use actix_web::{http::StatusCode,
HttpRequest,
HttpResponse};

use serde_json;

use reqwest::header::HeaderMap;

use builder_core::http_client::{HttpClient,
Expand Down
1 change: 0 additions & 1 deletion components/builder-api/src/server/resources/jobs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ use actix_web::{http::{self,
ServiceConfig},
HttpRequest,
HttpResponse};
use serde_json;

use crate::protocol::{jobsrv,
net::NetOk,
Expand Down
1 change: 0 additions & 1 deletion components/builder-api/src/server/resources/origins.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ use builder_core::Error::OriginDeleteError;
use bytes::Bytes;
use diesel::{pg::PgConnection,
result::Error::NotFound};
use serde_json;

use crate::{bldr_core,
hab_core::{crypto::{keys::{box_key_pair::WrappedSealedBox,
Expand Down
3 changes: 0 additions & 3 deletions components/builder-api/src/server/resources/pkgs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,7 @@ use bytes::Bytes;
use diesel::result::Error::NotFound;
use futures::{channel::mpsc,
StreamExt};
use percent_encoding;
use protobuf;
use serde::ser::Serialize;
use serde_json;
use std::{fs::{self,
remove_file,
File},
Expand Down
1 change: 0 additions & 1 deletion components/builder-api/src/server/resources/profile.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ use actix_web::{http::{self,
ServiceConfig},
HttpRequest,
HttpResponse};
use serde_json;

use crate::{bldr_core,
protocol::originsrv};
Expand Down
1 change: 0 additions & 1 deletion components/builder-api/src/server/resources/projects.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ use actix_web::{http::{self,
ServiceConfig},
HttpRequest,
HttpResponse};
use serde_json;

use crate::protocol::jobsrv;

Expand Down
2 changes: 0 additions & 2 deletions components/builder-api/src/server/services/github.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,9 @@ use actix_web::{error,
use github_api_client::{types::GitHubWebhookPush,
AppToken,
GitHubClient};
use hex;
use openssl::{hash::MessageDigest,
pkey::PKey,
sign::Signer};
use serde_json;
use std::{collections::HashSet,
path::PathBuf,
str::FromStr};
Expand Down
1 change: 0 additions & 1 deletion components/builder-api/src/server/services/memcache.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.

use memcache;
use protobuf::{self,
Message};
use rand::{self,
Expand Down
1 change: 0 additions & 1 deletion components/builder-core/src/api_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ use reqwest::{header::HeaderMap,
StatusCode};

use futures::stream::StreamExt;
use serde_json;
use tokio::io::AsyncWriteExt;

use crate::{error::{Error,
Expand Down
2 changes: 0 additions & 2 deletions components/builder-core/src/build_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,11 @@ use std::{collections::{HashMap,
str::FromStr,
string::ToString};

use glob;
use serde::{de,
Deserialize,
Deserializer,
Serialize,
Serializer};
use toml;

use crate::{error::{Error,
Result},
Expand Down
6 changes: 0 additions & 6 deletions components/builder-core/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,6 @@ use std::{error,
result,
string};

use base64;
use chrono;
use protobuf;
use reqwest;
use serde_json;

use crate::{hab_core,
protocol};

Expand Down
2 changes: 0 additions & 2 deletions components/builder-core/src/integrations.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@

use std::path::Path;

use base64;

use crate::{error::{Error,
Result},
hab_core::crypto::{keys::box_key_pair::WrappedSealedBox,
Expand Down
3 changes: 0 additions & 3 deletions components/builder-core/src/rpc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@ use reqwest::{header::HeaderMap,
Client,
StatusCode};

use protobuf;
use serde_json;

use crate::{error::{Error,
Result},
http_client::{ACCEPT_APPLICATION_JSON,
Expand Down
2 changes: 0 additions & 2 deletions components/builder-core/src/socket.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ use std::{cell::UnsafeCell,
SocketAddrV4,
SocketAddrV6}};

use zmq;

use crate::hab_core::os;

lazy_static! {
Expand Down
1 change: 0 additions & 1 deletion components/builder-db/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.

use num_cpus;
use percent_encoding::{utf8_percent_encode,
AsciiSet,
CONTROLS};
Expand Down
3 changes: 0 additions & 3 deletions components/builder-db/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@
use std::{fmt,
result};

use postgres;
use r2d2;

#[derive(Debug)]
pub enum Error {
AsyncListen(postgres::error::Error),
Expand Down
1 change: 0 additions & 1 deletion components/builder-db/src/models/package.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ use std::{fmt,
time::Instant};

use chrono::NaiveDateTime;
use protobuf;

use diesel::{self,
deserialize::{self,
Expand Down
1 change: 0 additions & 1 deletion components/builder-db/src/pool.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ use std::{fmt,
thread,
time::Duration};

use r2d2;
use r2d2_postgres::{self,
PostgresConnectionManager,
TlsMode};
Expand Down
4 changes: 0 additions & 4 deletions components/builder-graph/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,6 @@ use std::{error,
use crate::{db,
hab_core};

use postgres;
use protobuf;
use r2d2;

#[derive(Debug)]
pub enum Error {
Db(db::error::Error),
Expand Down
2 changes: 0 additions & 2 deletions components/builder-jobsrv/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ use std::{collections::HashSet,
option::IntoIter,
path::PathBuf};

use num_cpus;

use crate::{db::config::DataStoreCfg,
hab_core::{config::ConfigFile,
package::target::{self,
Expand Down
1 change: 0 additions & 1 deletion components/builder-jobsrv/src/data_store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ use chrono::{DateTime,
Utc};
use diesel::{result::Error as Dre,
Connection};
use postgres;
use protobuf::{self,
ProtobufEnum,
RepeatedField};
Expand Down
9 changes: 0 additions & 9 deletions components/builder-jobsrv/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,6 @@ use std::{error,
use actix_web::{http::StatusCode,
HttpResponse};

use chrono;
use diesel;
use postgres;
use protobuf;
use r2d2;
use rusoto_core;
use rusoto_s3;
use zmq;

use crate::{bldr_core,
db,
hab_core,
Expand Down
1 change: 0 additions & 1 deletion components/builder-jobsrv/src/server/log_ingester.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ use std::{fs::{self,
sync::mpsc,
thread::{self,
JoinHandle}};
use zmq;

/// ZMQ protocol frame to indicate a log line is being sent
const LOG_LINE: &str = "L";
Expand Down
2 changes: 0 additions & 2 deletions components/builder-jobsrv/src/server/scheduler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ use std::{collections::{HashMap,
use chrono::{DateTime,
Duration,
Utc};
use diesel;
use zmq;

use crate::{config::Config,
data_store::DataStore,
Expand Down
2 changes: 0 additions & 2 deletions components/builder-jobsrv/src/server/worker_manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,6 @@ use crate::db::models::{integration::*,
use crate::protocol::{jobsrv,
originsrv};

use zmq;

use crate::{config::Config,
data_store::DataStore,
error::{Error,
Expand Down
2 changes: 0 additions & 2 deletions components/builder-protocol/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ use std::{fmt,
result,
string::FromUtf8Error};

use protobuf;

#[derive(Debug)]
pub enum ProtocolError {
BadJobGroupProjectState(String),
Expand Down
2 changes: 0 additions & 2 deletions components/builder-protocol/src/message/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ pub mod net;
#[allow(renamed_and_removed_lints)]
pub mod originsrv;

use protobuf;

use crate::error::ProtocolError;

pub use self::net::{ErrCode,
Expand Down
7 changes: 0 additions & 7 deletions components/builder-worker/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,12 @@
// See the License for the specific language governing permissions and
// limitations under the License.

use futures_channel;
use git2;
use github_api_client;
use protobuf;
use retry;
use std::{error,
fmt,
io,
path::PathBuf,
result,
sync::mpsc};
use url;
use zmq;

use crate::{bldr_core,
hab_core,
Expand Down
2 changes: 0 additions & 2 deletions components/builder-worker/src/heartbeat.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ use std::{sync::mpsc,
JoinHandle},
time::Duration};

use zmq;

use crate::{bldr_core::socket::DEFAULT_CONTEXT,
protocol::{jobsrv as proto,
message}};
Expand Down
2 changes: 0 additions & 2 deletions components/builder-worker/src/log_forwarder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ use std::{sync::mpsc,
JoinHandle},
time::Duration};

use zmq;

use crate::{bldr_core::{logger::Logger,
socket::DEFAULT_CONTEXT},
config::Config,
Expand Down
1 change: 0 additions & 1 deletion components/builder-worker/src/runner/job_streamer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ use std::{fmt,
thread};

use protobuf::Message;
use zmq;

use crate::{bldr_core::{logger::Logger,
socket::DEFAULT_CONTEXT},
Expand Down
1 change: 0 additions & 1 deletion components/builder-worker/src/runner/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ use std::{fs,
thread::{self,
JoinHandle},
time::Duration};
use zmq;

// TODO fn: copied from `components/common/src/ui.rs`. As this component doesn't currently depend
// on habitat_common it didnt' seem worth it to add a dependency for only this constant. Probably
Expand Down
2 changes: 0 additions & 2 deletions components/builder-worker/src/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ use std::{collections::HashMap,
thread,
time::Duration};

use zmq;

use crate::{bldr_core::{self,
socket::DEFAULT_CONTEXT},
protocol::{jobsrv,
Expand Down
1 change: 0 additions & 1 deletion components/builder-worker/src/vcs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@

use std::path::Path;

use git2;
use github_api_client::{GitHubCfg,
GitHubClient};
use url::Url;
Expand Down
2 changes: 1 addition & 1 deletion components/github-api-client/src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ use builder_core::{http_client::{HttpClient,
metrics::CounterMetric};
use reqwest::{header::HeaderMap,
StatusCode};
use serde_json;

use std::{collections::HashMap,
iter::FromIterator,
path::Path,
Expand Down
Loading

0 comments on commit f55e474

Please sign in to comment.