From d446afe44c0cd55cb5044e4761f5718f85ea14f7 Mon Sep 17 00:00:00 2001 From: Francesco Cogno Date: Fri, 16 Aug 2019 14:57:46 +0200 Subject: [PATCH] Fixed clippy issues --- README.md | 19 +++++++++---------- azure_sdk_auth_aad/Cargo.toml | 2 +- azure_sdk_auth_aad/src/lib.rs | 6 +++--- azure_sdk_auth_aad/src/login_response.rs | 9 +++++++-- azure_sdk_cosmos/Cargo.toml | 2 +- azure_sdk_cosmos/src/client.rs | 3 ++- .../src/requests/document_requests.rs | 4 ++-- azure_sdk_storage_account/Cargo.toml | 4 ++-- azure_sdk_storage_account/src/lib.rs | 11 +++++------ azure_sdk_storage_account/tests/account.rs | 2 +- azure_sdk_storage_blob/Cargo.toml | 4 ++-- azure_sdk_storage_blob/src/lib.rs | 1 + azure_sdk_storage_core/Cargo.toml | 2 +- azure_sdk_storage_core/src/rest_client.rs | 2 -- azure_sdk_storage_table/Cargo.toml | 4 ++-- scripts/clippy_all.sh | 13 +++++++++++++ 16 files changed, 52 insertions(+), 36 deletions(-) create mode 100755 scripts/clippy_all.sh diff --git a/README.md b/README.md index 26f19f056..31c18fd1e 100644 --- a/README.md +++ b/README.md @@ -5,21 +5,20 @@ [![Build Status](https://travis-ci.org/MindFlavor/AzureSDKForRust.svg?branch=master)](https://travis-ci.org/MindFlavor/AzureSDKForRust) [![Coverage Status](https://coveralls.io/repos/MindFlavor/AzureSDKForRust/badge.svg?branch=master&service=github)](https://coveralls.io/github/MindFlavor/AzureSDKForRust?branch=master) ![stability-unstable](https://img.shields.io/badge/stability-unstable-yellow.svg) -[![tag](https://img.shields.io/github/tag/mindflavor/AzureSDKForRust.svg)](https://github.com/MindFlavor/AzureSDKForRust/tree/0.20.2) [![release](https://img.shields.io/github/release/mindflavor/AzureSDKForRust.svg)](https://github.com/MindFlavor/AzureSDKForRust/releases/tag/0.20.2) [![commitssince](https://img.shields.io/github/commits-since/mindflavor/AzureSDKForRust/0.20.2.svg)](https://github.com/MindFlavor/AzureSDKForRust/commits/master) +[![tag](https://img.shields.io/github/tag/mindflavor/AzureSDKForRust.svg)](https://github.com/MindFlavor/AzureSDKForRust/tree/0.20.3) [![release](https://img.shields.io/github/release/mindflavor/AzureSDKForRust.svg)](https://github.com/MindFlavor/AzureSDKForRust/releases/tag/0.20.3) [![commitssince](https://img.shields.io/github/commits-since/mindflavor/AzureSDKForRust/0.20.3.svg)](https://github.com/MindFlavor/AzureSDKForRust/commits/master) [![GitHub contributors](https://img.shields.io/github/contributors/MindFlavor/AzureSDKForRust.svg)](https://github.com/MindFlavor/AzureSDKForRust/graphs/contributors) Crate | Docs | Crates.io | Downloads | Downloads@Latest | -- | -- | -- | -- | -- | -[azure_sdk_auth_aad](https://github.com/MindFlavor/AzureSDKForRust/tree/master/azure_sdk_auth_aad) | [![docs](https://docs.rs/azure_sdk_auth_aad/badge.svg)](https://docs.rs/azure_sdk_auth_aad/0.20.2/azure_sdk_auth_aad) | [![Crate](https://img.shields.io/crates/v/azure_sdk_auth_aad.svg)](https://crates.io/crates/azure_sdk_auth_aad) | [![cratedown](https://img.shields.io/crates/d/azure_sdk_auth_aad.svg)](https://crates.io/crates/azure_sdk_auth_aad) | [![cratelastdown](https://img.shields.io/crates/dv/azure_sdk_auth_aad.svg)](https://crates.io/crates/azure_sdk_auth_aad) -[azure_sdk_core](https://github.com/MindFlavor/AzureSDKForRust/tree/master/azure_sdk_core) | [![docs](https://docs.rs/azure_sdk_core/badge.svg)](https://docs.rs/azure_sdk_core/0.20.2/azure_sdk_for_rust) | [![Crate](https://img.shields.io/crates/v/azure_sdk_core.svg)](https://crates.io/crates/azure_sdk_core) | [![cratedown](https://img.shields.io/crates/d/azure_sdk_core.svg)](https://crates.io/crates/azure_sdk_core) | [![cratelastdown](https://img.shields.io/crates/dv/azure_sdk_core.svg)](https://crates.io/crates/azure_sdk_core) -[azure_sdk_cosmos](https://github.com/MindFlavor/AzureSDKForRust/tree/master/azure_sdk_cosmos) | [![docs](https://docs.rs/azure_sdk_cosmos/badge.svg)](https://docs.rs/azure_sdk_core/0.21.0/azure_sdk_cosmos) | [![Crate](https://img.shields.io/crates/v/azure_sdk_cosmos.svg)](https://crates.io/crates/azure_sdk_cosmos) | [![cratedown](https://img.shields.io/crates/d/azure_sdk_cosmos.svg)](https://crates.io/crates/azure_sdk_cosmos) | [![cratelastdown](https://img.shields.io/crates/dv/azure_sdk_cosmos.svg)](https://crates.io/crates/azure_sdk_cosmos) -[azure_sdk_service_bus](https://github.com/MindFlavor/AzureSDKForRust/tree/master/azure_sdk_service_bus) | [![docs](https://docs.rs/azure_sdk_service_bus/badge.svg)](https://docs.rs/azure_sdk_core/0.20.2/azure_sdk_service_bus) | [![Crate](https://img.shields.io/crates/v/azure_sdk_service_bus.svg)](https://crates.io/crates/azure_sdk_service_bus) | [![cratedown](https://img.shields.io/crates/d/azure_sdk_service_bus.svg)](https://crates.io/crates/azure_sdk_service_bus) | [![cratelastdown](https://img.shields.io/crates/dv/azure_sdk_service_bus.svg)](https://crates.io/crates/azure_sdk_service_bus) -[azure_sdk_storage_account](https://github.com/MindFlavor/AzureSDKForRust/tree/master/azure_sdk_storage_account) | [![docs](https://docs.rs/azure_sdk_storage_account/badge.svg)](https://docs.rs/azure_sdk_core/0.20.2/azure_sdk_storage_account) | [![Crate](https://img.shields.io/crates/v/azure_sdk_storage_account.svg)](https://crates.io/crates/azure_sdk_storage_account) | [![cratedown](https://img.shields.io/crates/d/azure_sdk_storage_account.svg)](https://crates.io/crates/azure_sdk_storage_account) | [![cratelastdown](https://img.shields.io/crates/dv/azure_sdk_storage_account.svg)](https://crates.io/crates/azure_sdk_storage_account) -[azure_sdk_storage_blob](https://github.com/MindFlavor/AzureSDKForRust/tree/master/azure_sdk_storage_blob) | [![docs](https://docs.rs/azure_sdk_storage_blob/badge.svg)](https://docs.rs/azure_sdk_core/0.20.2/azure_sdk_storage_blob) | [![Crate](https://img.shields.io/crates/v/azure_sdk_storage_blob.svg)](https://crates.io/crates/azure_sdk_storage_blob) | [![cratedown](https://img.shields.io/crates/d/azure_sdk_storage_blob.svg)](https://crates.io/crates/azure_sdk_storage_blob) | [![cratelastdown](https://img.shields.io/crates/dv/azure_sdk_storage_blob.svg)](https://crates.io/crates/azure_sdk_storage_blob) -[azure_sdk_storage_core](https://github.com/MindFlavor/AzureSDKForRust/tree/master/azure_sdk_storage_core) | [![docs](https://docs.rs/azure_sdk_storage_core/badge.svg)](https://docs.rs/azure_sdk_core/0.20.2/azure_sdk_storage_core) | [![Crate](https://img.shields.io/crates/v/azure_sdk_storage_core.svg)](https://crates.io/crates/azure_sdk_storage_core) | [![cratedown](https://img.shields.io/crates/d/azure_sdk_storage_core.svg)](https://crates.io/crates/azure_sdk_storage_core) | [![cratelastdown](https://img.shields.io/crates/dv/azure_sdk_storage_core.svg)](https://crates.io/crates/azure_sdk_storage_core) -[azure_sdk_storage_table](https://github.com/MindFlavor/AzureSDKForRust/tree/master/azure_sdk_storage_table) | [![docs](https://docs.rs/azure_sdk_storage_table/badge.svg)](https://docs.rs/azure_sdk_core/0.20.2/azure_sdk_storage_table) | [![Crate](https://img.shields.io/crates/v/azure_sdk_storage_table.svg)](https://crates.io/crates/azure_sdk_storage_table) | [![cratedown](https://img.shields.io/crates/d/azure_sdk_storage_table.svg)](https://crates.io/crates/azure_sdk_storage_table) | [![cratelastdown](https://img.shields.io/crates/dv/azure_sdk_storage_table.svg)](https://crates.io/crates/azure_sdk_storage_table) - +[azure_sdk_auth_aad](https://github.com/MindFlavor/AzureSDKForRust/tree/master/azure_sdk_auth_aad) | [![docs](https://docs.rs/azure_sdk_auth_aad/badge.svg)](https://docs.rs/azure_sdk_auth_aad/0.21.0/azure_sdk_auth_aad) | [![Crate](https://img.shields.io/crates/v/azure_sdk_auth_aad.svg)](https://crates.io/crates/azure_sdk_auth_aad) | [![cratedown](https://img.shields.io/crates/d/azure_sdk_auth_aad.svg)](https://crates.io/crates/azure_sdk_auth_aad) | [![cratelastdown](https://img.shields.io/crates/dv/azure_sdk_auth_aad.svg)](https://crates.io/crates/azure_sdk_auth_aad) +[azure_sdk_core](https://github.com/MindFlavor/AzureSDKForRust/tree/master/azure_sdk_core) | [![docs](https://docs.rs/azure_sdk_core/badge.svg)](https://docs.rs/azure_sdk_core/0.20.3/azure_sdk_core) | [![Crate](https://img.shields.io/crates/v/azure_sdk_core.svg)](https://crates.io/crates/azure_sdk_core) | [![cratedown](https://img.shields.io/crates/d/azure_sdk_core.svg)](https://crates.io/crates/azure_sdk_core) | [![cratelastdown](https://img.shields.io/crates/dv/azure_sdk_core.svg)](https://crates.io/crates/azure_sdk_core) +[azure_sdk_cosmos](https://github.com/MindFlavor/AzureSDKForRust/tree/master/azure_sdk_cosmos) | [![docs](https://docs.rs/azure_sdk_cosmos/badge.svg)](https://docs.rs/azure_sdk_cosmos/0.22.0/azure_sdk_cosmos) | [![Crate](https://img.shields.io/crates/v/azure_sdk_cosmos.svg)](https://crates.io/crates/azure_sdk_cosmos) | [![cratedown](https://img.shields.io/crates/d/azure_sdk_cosmos.svg)](https://crates.io/crates/azure_sdk_cosmos) | [![cratelastdown](https://img.shields.io/crates/dv/azure_sdk_cosmos.svg)](https://crates.io/crates/azure_sdk_cosmos) +[azure_sdk_service_bus](https://github.com/MindFlavor/AzureSDKForRust/tree/master/azure_sdk_service_bus) | [![docs](https://docs.rs/azure_sdk_service_bus/badge.svg)](https://docs.rs/azure_sdk_service_bus/0.20.2/azure_sdk_service_bus) | [![Crate](https://img.shields.io/crates/v/azure_sdk_service_bus.svg)](https://crates.io/crates/azure_sdk_service_bus) | [![cratedown](https://img.shields.io/crates/d/azure_sdk_service_bus.svg)](https://crates.io/crates/azure_sdk_service_bus) | [![cratelastdown](https://img.shields.io/crates/dv/azure_sdk_service_bus.svg)](https://crates.io/crates/azure_sdk_service_bus) +[azure_sdk_storage_account](https://github.com/MindFlavor/AzureSDKForRust/tree/master/azure_sdk_storage_account) | [![docs](https://docs.rs/azure_sdk_storage_account/badge.svg)](https://docs.rs/azure_sdk_storage_account/0.20.3/azure_sdk_storage_account) | [![Crate](https://img.shields.io/crates/v/azure_sdk_storage_account.svg)](https://crates.io/crates/azure_sdk_storage_account) | [![cratedown](https://img.shields.io/crates/d/azure_sdk_storage_account.svg)](https://crates.io/crates/azure_sdk_storage_account) | [![cratelastdown](https://img.shields.io/crates/dv/azure_sdk_storage_account.svg)](https://crates.io/crates/azure_sdk_storage_account) +[azure_sdk_storage_blob](https://github.com/MindFlavor/AzureSDKForRust/tree/master/azure_sdk_storage_blob) | [![docs](https://docs.rs/azure_sdk_storage_blob/badge.svg)](https://docs.rs/azure_sdk_storage_blob/0.20.3/azure_sdk_storage_blob) | [![Crate](https://img.shields.io/crates/v/azure_sdk_storage_blob.svg)](https://crates.io/crates/azure_sdk_storage_blob) | [![cratedown](https://img.shields.io/crates/d/azure_sdk_storage_blob.svg)](https://crates.io/crates/azure_sdk_storage_blob) | [![cratelastdown](https://img.shields.io/crates/dv/azure_sdk_storage_blob.svg)](https://crates.io/crates/azure_sdk_storage_blob) +[azure_sdk_storage_core](https://github.com/MindFlavor/AzureSDKForRust/tree/master/azure_sdk_storage_core) | [![docs](https://docs.rs/azure_sdk_storage_core/badge.svg)](https://docs.rs/azure_sdk_storage_core/0.20.3/azure_sdk_storage_core) | [![Crate](https://img.shields.io/crates/v/azure_sdk_storage_core.svg)](https://crates.io/crates/azure_sdk_storage_core) | [![cratedown](https://img.shields.io/crates/d/azure_sdk_storage_core.svg)](https://crates.io/crates/azure_sdk_storage_core) | [![cratelastdown](https://img.shields.io/crates/dv/azure_sdk_storage_core.svg)](https://crates.io/crates/azure_sdk_storage_core) +[azure_sdk_storage_table](https://github.com/MindFlavor/AzureSDKForRust/tree/master/azure_sdk_storage_table) | [![docs](https://docs.rs/azure_sdk_storage_table/badge.svg)](https://docs.rs/azure_sdk_storage_table/0.20.3/azure_sdk_storage_table) | [![Crate](https://img.shields.io/crates/v/azure_sdk_storage_table.svg)](https://crates.io/crates/azure_sdk_storage_table) | [![cratedown](https://img.shields.io/crates/d/azure_sdk_storage_table.svg)](https://crates.io/crates/azure_sdk_storage_table) | [![cratelastdown](https://img.shields.io/crates/dv/azure_sdk_storage_table.svg)](https://crates.io/crates/azure_sdk_storage_table) ## Introduction diff --git a/azure_sdk_auth_aad/Cargo.toml b/azure_sdk_auth_aad/Cargo.toml index eebcf6fc8..1711e70b1 100644 --- a/azure_sdk_auth_aad/Cargo.toml +++ b/azure_sdk_auth_aad/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "azure_sdk_auth_aad" -version = "0.20.2" +version = "0.21.0" description = "Rust wrappers around Microsoft Azure REST APIs - Azure OAuth2 helper crate" readme = "README.md" authors = ["Francesco Cogno "] diff --git a/azure_sdk_auth_aad/src/lib.rs b/azure_sdk_auth_aad/src/lib.rs index 3e75bcd12..006e73004 100644 --- a/azure_sdk_auth_aad/src/lib.rs +++ b/azure_sdk_auth_aad/src/lib.rs @@ -2,7 +2,6 @@ extern crate failure; #[macro_use] extern crate serde_derive; -#[macro_use] extern crate log; use azure_sdk_core::errors::AzureError; use futures::future::{done, ok, Future}; @@ -12,6 +11,7 @@ use oauth2::curl::http_client; use oauth2::{ AuthType, AuthUrl, AuthorizationCode, ClientId, ClientSecret, CsrfToken, PkceCodeChallenge, PkceCodeVerifier, RedirectUrl, TokenUrl, }; +use std::str::FromStr; use url::form_urlencoded; use url::Url; mod login_response; @@ -82,7 +82,7 @@ pub fn exchange( .set_pkce_verifier(auth_obj.pkce_code_verifier) .request(http_client); - println!("MS Graph returned the following token:\n{:?}\n", token); + debug!("MS Graph returned the following token:\n{:?}\n", token); token } @@ -114,7 +114,7 @@ pub fn authorize_non_interactive( .and_then(move |request| { perform_http_request(&client, request, StatusCode::OK).and_then(|resp| { done(LoginResponse::from_str(&resp)).from_err().and_then(|r| { - println!("{:?}", r); + debug!("{:?}", r); ok(r) }) }) diff --git a/azure_sdk_auth_aad/src/login_response.rs b/azure_sdk_auth_aad/src/login_response.rs index 8076c1bbd..b10f48aa8 100644 --- a/azure_sdk_auth_aad/src/login_response.rs +++ b/azure_sdk_auth_aad/src/login_response.rs @@ -1,6 +1,7 @@ use azure_sdk_core::errors::AzureError; use chrono::{DateTime, TimeZone, Utc}; use oauth2::AccessToken; +use std::str::FromStr; #[derive(Debug, Clone, Deserialize)] struct _LoginResponse { @@ -24,8 +25,10 @@ pub struct LoginResponse { pub access_token: AccessToken, } -impl LoginResponse { - pub fn from_str(s: &str) -> Result { +impl FromStr for LoginResponse { + type Err = AzureError; + + fn from_str(s: &str) -> Result { let r: _LoginResponse = serde_json::from_str(s)?; let expires_on: i64 = r.expires_on.parse()?; @@ -44,7 +47,9 @@ impl LoginResponse { access_token: AccessToken::new(r.access_token), }) } +} +impl LoginResponse { pub fn access_token(&self) -> &AccessToken { &self.access_token } diff --git a/azure_sdk_cosmos/Cargo.toml b/azure_sdk_cosmos/Cargo.toml index c1df7e1e0..c218da9ba 100644 --- a/azure_sdk_cosmos/Cargo.toml +++ b/azure_sdk_cosmos/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "azure_sdk_cosmos" -version = "0.21.0" +version = "0.22.0" description = "Rust wrappers around Microsoft Azure REST APIs - Azure Cosmos DB crate" readme = "README.md" authors = ["Francesco Cogno ", "Max Gortman "] diff --git a/azure_sdk_cosmos/src/client.rs b/azure_sdk_cosmos/src/client.rs index d5ddac57c..dd0e6a3d2 100644 --- a/azure_sdk_cosmos/src/client.rs +++ b/azure_sdk_cosmos/src/client.rs @@ -127,6 +127,7 @@ impl CosmosUriBuilder for CustomCosmosUri { pub struct ClientBuilder {} impl ClientBuilder { + #[allow(clippy::new_ret_no_self)] pub fn new(auth_token: AuthorizationToken) -> Result, AzureError> { let client = hyper::Client::builder().build(HttpsConnector::new(4)); let cosmos_uri_builder = DefaultCosmosUri::new(auth_token.account()); @@ -767,7 +768,7 @@ fn string_to_sign(http_method: &hyper::Method, rt: ResourceType, resource_link: } fn generate_resource_link(u: &str) -> &str { - static ENDING_STRINGS: &'static [&str] = &["dbs", "colls", "docs"]; + static ENDING_STRINGS: &[&str] = &["dbs", "colls", "docs"]; // store the element only if it does not end with dbs, colls or docs let p = u; diff --git a/azure_sdk_cosmos/src/requests/document_requests.rs b/azure_sdk_cosmos/src/requests/document_requests.rs index 0951881b3..b15215ffa 100644 --- a/azure_sdk_cosmos/src/requests/document_requests.rs +++ b/azure_sdk_cosmos/src/requests/document_requests.rs @@ -25,7 +25,7 @@ impl CreateDocumentRequest { } } - request_option!(is_upsert, bool, HEADER_DOCUMENTDB_IS_UPSERT); + request_option!(upsert, bool, HEADER_DOCUMENTDB_IS_UPSERT); request_option!(indexing_directive, IndexingDirective, HEADER_INDEXING_DIRECTIVE); request_bytes_ref!(partition_key, str, HEADER_DOCUMENTDB_PARTITIONKEY); request_option!(use_multiple_write_locations, bool, HEADER_ALLOW_MULTIPLE_WRITES); @@ -196,7 +196,7 @@ impl QueryDocumentRequest { let mut d = v.get_mut("Documents").unwrap().take(); debug!("\n\nd == {:?}\n\n", d); - let docs = d.as_array_mut().unwrap().into_iter().map(|doc| { + let docs = d.as_array_mut().unwrap().iter_mut().map(|doc| { // We could either have a Document or a plain entry. // We will find out here. let mut doc = doc.take(); diff --git a/azure_sdk_storage_account/Cargo.toml b/azure_sdk_storage_account/Cargo.toml index f2994286f..792355782 100644 --- a/azure_sdk_storage_account/Cargo.toml +++ b/azure_sdk_storage_account/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "azure_sdk_storage_account" -version = "0.20.2" +version = "0.20.3" description = "Rust wrappers around Microsoft Azure REST APIs - Blob storage account crate" readme = "README.md" authors = ["Francesco Cogno ", "Max Gortman "] @@ -16,7 +16,7 @@ edition = "2018" [dependencies] azure_sdk_core = { path="../azure_sdk_core", version = "0.20.2" } -azure_sdk_storage_core = { path="../azure_sdk_storage_core", version = "0.20.2" } +azure_sdk_storage_core = { path="../azure_sdk_storage_core", version = "0.20.3" } ring = "0.14" md5 = "0.6" RustyXML = "0.1" diff --git a/azure_sdk_storage_account/src/lib.rs b/azure_sdk_storage_account/src/lib.rs index 17c481f20..cfda54d56 100644 --- a/azure_sdk_storage_account/src/lib.rs +++ b/azure_sdk_storage_account/src/lib.rs @@ -14,28 +14,27 @@ extern crate uuid; extern crate xml; #[macro_use] extern crate log; +extern crate azure_sdk_core; +extern crate azure_sdk_storage_core; +extern crate bytes; extern crate quick_error; extern crate serde; -#[macro_use] extern crate serde_derive; -extern crate bytes; extern crate serde_json; extern crate serde_xml_rs; extern crate smallvec; - -#[macro_use] -extern crate azure_sdk_core; -extern crate azure_sdk_storage_core; pub mod account; pub mod prelude; use azure_sdk_storage_core::client::Client; pub trait Account { + #[allow(clippy::needless_lifetimes)] fn get_account_information<'a>(&'a self) -> account::requests::GetAccountInformationBuilder<'a>; } impl Account for Client { + #[allow(clippy::needless_lifetimes)] fn get_account_information<'a>(&'a self) -> account::requests::GetAccountInformationBuilder<'a> { account::requests::GetAccountInformationBuilder::new(self) } diff --git a/azure_sdk_storage_account/tests/account.rs b/azure_sdk_storage_account/tests/account.rs index aa5ce8188..89abbf1ae 100644 --- a/azure_sdk_storage_account/tests/account.rs +++ b/azure_sdk_storage_account/tests/account.rs @@ -1,5 +1,5 @@ #![cfg(all(test, feature = "test_e2e"))] -use azure_sdk_storage_blob::prelude::*; +use azure_sdk_storage_account::prelude::*; use azure_sdk_storage_core::prelude::*; use tokio_core::reactor::Core; diff --git a/azure_sdk_storage_blob/Cargo.toml b/azure_sdk_storage_blob/Cargo.toml index a081cba2a..d25e6ad60 100644 --- a/azure_sdk_storage_blob/Cargo.toml +++ b/azure_sdk_storage_blob/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "azure_sdk_storage_blob" -version = "0.20.2" +version = "0.20.3" description = "Rust wrappers around Microsoft Azure REST APIs - Blob storage crate" readme = "README.md" authors = ["Francesco Cogno ", "Max Gortman ", "Dong Liu "] @@ -16,7 +16,7 @@ edition = "2018" [dependencies] azure_sdk_core = { path="../azure_sdk_core", version = "0.20.2" } -azure_sdk_storage_core = { path="../azure_sdk_storage_core", version = "0.20.2" } +azure_sdk_storage_core = { path="../azure_sdk_storage_core", version = "0.20.3" } ring = "0.14" md5 = "0.6" RustyXML = "0.1" diff --git a/azure_sdk_storage_blob/src/lib.rs b/azure_sdk_storage_blob/src/lib.rs index c0f359a1e..68d9e7fac 100644 --- a/azure_sdk_storage_blob/src/lib.rs +++ b/azure_sdk_storage_blob/src/lib.rs @@ -1,4 +1,5 @@ #![recursion_limit = "128"] +#![allow(clippy::needless_lifetimes)] extern crate base64; extern crate chrono; diff --git a/azure_sdk_storage_core/Cargo.toml b/azure_sdk_storage_core/Cargo.toml index 16464d2a6..45584a925 100644 --- a/azure_sdk_storage_core/Cargo.toml +++ b/azure_sdk_storage_core/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "azure_sdk_storage_core" -version = "0.20.2" +version = "0.20.3" description = "Rust wrappers around Microsoft Azure REST APIs - Core storage crate" readme = "README.md" authors = ["Francesco Cogno ", "Max Gortman ", "Dong Liu "] diff --git a/azure_sdk_storage_core/src/rest_client.rs b/azure_sdk_storage_core/src/rest_client.rs index 5c2eb7895..92599af62 100644 --- a/azure_sdk_storage_core/src/rest_client.rs +++ b/azure_sdk_storage_core/src/rest_client.rs @@ -54,7 +54,6 @@ fn add_if_exists(h: &HeaderMap, key: K) -> &str { } #[allow(unknown_lints)] -#[clippy::needless_pass_by_value] fn string_to_sign(h: &HeaderMap, u: &url::Url, method: &Method, service_type: ServiceType) -> String { match service_type { ServiceType::Table => { @@ -233,7 +232,6 @@ fn lexy_sort(vec: &url::form_urlencoded::Parse, query_param: &str) -> Vec<(Strin } #[allow(unknown_lints)] -#[clippy::too_many_arguments] pub fn perform_request( client: &hyper::Client>, uri: &str, diff --git a/azure_sdk_storage_table/Cargo.toml b/azure_sdk_storage_table/Cargo.toml index c9e09e2e7..766393aa8 100644 --- a/azure_sdk_storage_table/Cargo.toml +++ b/azure_sdk_storage_table/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "azure_sdk_storage_table" -version = "0.20.2" +version = "0.20.3" description = "Rust wrappers around Microsoft Azure REST APIs - Table storage crate" readme = "README.md" authors = ["Francesco Cogno ", "Max Gortman ", "Dong Liu "] @@ -16,7 +16,7 @@ edition = "2018" [dependencies] azure_sdk_core = { path="../azure_sdk_core", version = "0.20.2" } -azure_sdk_storage_core = { path="../azure_sdk_storage_core", version = "0.20.2" } +azure_sdk_storage_core = { path="../azure_sdk_storage_core", version = "0.20.3" } ring = "0.14" md5 = "0.6" RustyXML = "0.1" diff --git a/scripts/clippy_all.sh b/scripts/clippy_all.sh new file mode 100755 index 000000000..2a3ce6e2f --- /dev/null +++ b/scripts/clippy_all.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +set -ev + +for i in azure_sdk* ; do + cd $i + cargo clean + cd .. +done + +cargo clippy + +