Skip to content

Commit

Permalink
Clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
tustvold committed May 2, 2024
1 parent ffc8fa3 commit 1779255
Show file tree
Hide file tree
Showing 9 changed files with 1 addition and 61 deletions.
12 changes: 0 additions & 12 deletions object_store/src/aws/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,21 +70,9 @@ enum Error {
#[snafu(display("Configuration key: '{}' is not known.", key))]
UnknownConfigurationKey { key: String },

#[snafu(display("Bucket '{}' not found", bucket))]
BucketNotFound { bucket: String },

#[snafu(display("Failed to resolve region for bucket '{}'", bucket))]
ResolveRegion {
bucket: String,
source: reqwest::Error,
},

#[snafu(display("Invalid Zone suffix for bucket '{bucket}'"))]
ZoneSuffix { bucket: String },

#[snafu(display("Failed to parse the region for bucket '{}'", bucket))]
RegionParse { bucket: String },

#[snafu(display("Invalid encryption type: {}. Valid values are \"AES256\", \"sse:kms\", and \"sse:kms:dsse\".", passed))]
InvalidEncryptionType { passed: String },

Expand Down
6 changes: 0 additions & 6 deletions object_store/src/aws/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,6 @@ const SHA256_CHECKSUM: &str = "x-amz-checksum-sha256";
#[derive(Debug, Snafu)]
#[allow(missing_docs)]
pub(crate) enum Error {
#[snafu(display("Error fetching get response body {}: {}", path, source))]
GetResponseBody {
source: reqwest::Error,
path: String,
},

#[snafu(display("Error performing DeleteObjects request: {}", source))]
DeleteObjectsRequest { source: crate::client::retry::Error },

Expand Down
12 changes: 0 additions & 12 deletions object_store/src/aws/dynamo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -451,18 +451,6 @@ struct PutItem<'a> {
return_values_on_condition_check_failure: Option<ReturnValues>,
}

/// A DynamoDB [GetItem] payload
///
/// [GetItem]: https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_GetItem.html
#[derive(Serialize)]
#[serde(rename_all = "PascalCase")]
struct GetItem<'a> {
/// The table name
table_name: &'a str,
/// The primary key
key: Map<'a, &'a str, AttributeValue<'a>>,
}

#[derive(Deserialize)]
struct ErrorResponse<'a> {
#[serde(rename = "__type")]
Expand Down
5 changes: 0 additions & 5 deletions object_store/src/azure/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,11 +89,6 @@ enum Error {

#[snafu(display("Configuration key: '{}' is not known.", key))]
UnknownConfigurationKey { key: String },

#[snafu(display("Unable to extract metadata from headers: {}", source))]
Metadata {
source: crate::client::header::Error,
},
}

impl From<Error> for crate::Error {
Expand Down
11 changes: 0 additions & 11 deletions object_store/src/azure/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,6 @@ pub(crate) enum Error {
path: String,
},

#[snafu(display("Error getting get response body {}: {}", path, source))]
GetResponseBody {
source: reqwest::Error,
path: String,
},

#[snafu(display("Error performing put request {}: {}", path, source))]
PutRequest {
source: crate::client::retry::Error,
Expand All @@ -94,11 +88,6 @@ pub(crate) enum Error {
#[snafu(display("Got invalid list response: {}", source))]
InvalidListResponse { source: quick_xml::de::DeError },

#[snafu(display("Error authorizing request: {}", source))]
Authorization {
source: crate::azure::credential::Error,
},

#[snafu(display("Unable to extract metadata from headers: {}", source))]
Metadata {
source: crate::client::header::Error,
Expand Down
5 changes: 0 additions & 5 deletions object_store/src/gcp/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,6 @@ enum Error {
#[snafu(display("Configuration key: '{}' is not known.", key))]
UnknownConfigurationKey { key: String },

#[snafu(display("Unable to extract metadata from headers: {}", source))]
Metadata {
source: crate::client::header::Error,
},

#[snafu(display("GCP credential error: {}", source))]
Credential { source: credential::Error },
}
Expand Down
6 changes: 0 additions & 6 deletions object_store/src/gcp/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,12 +81,6 @@ enum Error {
#[snafu(display("Got invalid put response: {}", source))]
InvalidPutResponse { source: quick_xml::de::DeError },

#[snafu(display("Error performing post request {}: {}", path, source))]
PostRequest {
source: crate::client::retry::Error,
path: String,
},

#[snafu(display("Unable to extract metadata from headers: {}", source))]
Metadata {
source: crate::client::header::Error,
Expand Down
2 changes: 1 addition & 1 deletion object_store/src/gcp/credential.rs
Original file line number Diff line number Diff line change
Expand Up @@ -536,7 +536,7 @@ impl ApplicationDefaultCredentials {
let path = Path::new(&home).join(Self::CREDENTIALS_PATH);

// It's expected for this file to not exist unless it has been explicitly configured by the user.
if path.try_exists().unwrap_or(false) {
if path.exists() {
return read_credentials_file::<Self>(path).map(Some);
}
}
Expand Down
3 changes: 0 additions & 3 deletions object_store/src/http/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,6 @@ enum Error {
Metadata {
source: crate::client::header::Error,
},

#[snafu(display("Request error: {}", source))]
Reqwest { source: reqwest::Error },
}

impl From<Error> for crate::Error {
Expand Down

0 comments on commit 1779255

Please sign in to comment.