diff --git a/aws-creds/Cargo.toml b/aws-creds/Cargo.toml index c700a978ff..62da8b33ab 100644 --- a/aws-creds/Cargo.toml +++ b/aws-creds/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "aws-creds" -version = "0.29.1" +version = "0.30.0" authors = ["Drazen Urch"] description = "Tiny Rust library for working with Amazon IAM credential,s, supports `s3` crate" repository = "https://github.com/durch/rust-s3" @@ -21,9 +21,7 @@ rust-ini = "0.18" attohttpc = { version = "0.19", default-features = false, features = ["json"], optional = true } url = "2" serde-xml-rs = "0.5" -serde = "1" -serde_derive = "1" - +serde = { version = "1.0.137", features = ["derive"] } [features] default = ["native-tls"] diff --git a/aws-creds/src/credentials.rs b/aws-creds/src/credentials.rs index 0aa65a2041..c621288d32 100644 --- a/aws-creds/src/credentials.rs +++ b/aws-creds/src/credentials.rs @@ -1,6 +1,7 @@ #![allow(dead_code)] use crate::error::CredentialsError; use ini::Ini; +use serde::{Deserialize, Serialize}; use serde_xml_rs as serde_xml; use std::collections::HashMap; use std::env; @@ -61,7 +62,7 @@ use url::Url; /// #[cfg(feature="http-credentials")] /// let credentials = Credentials::new(None, None, None, None, None); /// ``` -#[derive(Clone, Debug, Eq, PartialEq)] +#[derive(Clone, Debug, Eq, PartialEq, Serialize, Deserialize)] pub struct Credentials { /// AWS public access key. pub access_key: Option, diff --git a/aws-creds/src/lib.rs b/aws-creds/src/lib.rs index ceaae214c0..21bd9b8a97 100644 --- a/aws-creds/src/lib.rs +++ b/aws-creds/src/lib.rs @@ -1,9 +1,6 @@ #![allow(unused_imports)] #![forbid(unsafe_code)] -#[macro_use] -extern crate serde_derive; - mod credentials; pub use credentials::*; pub mod error; diff --git a/aws-region/Cargo.toml b/aws-region/Cargo.toml index 96625f02e1..0974352a6f 100644 --- a/aws-region/Cargo.toml +++ b/aws-region/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "aws-region" -version = "0.24.1" +version = "0.25.0" authors = ["Drazen Urch"] description = "Tiny Rust library for working with Amazon AWS regions, supports `s3` crate" repository = "https://github.com/durch/rust-s3" @@ -16,3 +16,4 @@ path = "src/lib.rs" [dependencies] thiserror = "1" +serde = { version = "1.0.137", features = ["derive"] } diff --git a/aws-region/src/region.rs b/aws-region/src/region.rs index 3478b9c232..9367f4a7e1 100644 --- a/aws-region/src/region.rs +++ b/aws-region/src/region.rs @@ -1,5 +1,6 @@ #![allow(dead_code)] +use serde::{Deserialize, Serialize}; use std::fmt; use std::str::{self, FromStr}; @@ -24,7 +25,7 @@ use std::str::{self, FromStr}; /// let region = Region::Custom { region: region_name, endpoint }; /// /// ``` -#[derive(Clone, Debug, Eq, PartialEq)] +#[derive(Clone, Debug, Eq, PartialEq, Serialize, Deserialize)] pub enum Region { /// us-east-1 UsEast1, diff --git a/s3/Cargo.toml b/s3/Cargo.toml index a40f3a1b92..ac0e347802 100644 --- a/s3/Cargo.toml +++ b/s3/Cargo.toml @@ -22,9 +22,9 @@ path = "src/lib.rs" async-std = { version = "1", optional = true } async-trait = "0.1" attohttpc = { version = "0.19", optional = true, default-features = false } -aws-creds = { version = "0.29", default-features = false } +aws-creds = { version = "0.30.0", default-features = false } # aws-creds = { path = "../aws-creds", default-features = false } -aws-region = "0.24" +aws-region = "0.25.0" # aws-region = {path = "../aws-region"} base64 = "0.13" cfg-if = "1"