durch / rust-s3

Rust library for interfacing with S3 API compatible services
MIT License
498 stars 195 forks source link

AWS Creds Build Error when not using TLS #354

Open TBoshoven opened 1 year ago

TBoshoven commented 1 year ago

Describe the bug Using sync client with no TLS causes build errors:

   Compiling aws-creds v0.34.1
error[E0599]: no function or associated item named `default` found for struct `Credentials` in the current scope
   --> /home/tom/.cargo/registry/src/index.crates.io-6f17d22bba15001f/aws-creds-0.34.1/src/credentials.rs:195:46
    |
70  | pub struct Credentials {
    | ---------------------- function or associated item `default` not found for this struct
...
195 |                 let refreshed = Credentials::default()?;
    |                                              ^^^^^^^ function or associated item not found in `Credentials`
    |
    = help: items from traits can only be used if the trait is implemented and in scope
    = note: the following traits define an item `default`, perhaps you need to implement one of them:
            candidate #1: `std::default::Default`
            candidate #2: `tinyvec::array::Array`

For more information about this error, try `rustc --explain E0599`.
error: could not compile `aws-creds` (lib) due to previous error

To Reproduce (in an empty directory)

cargo init
cargo add --no-default-features -F sync rust-s3@0.33.0
cargo run

Expected behavior Hello world app builds and runs.

Environment

Additional context I think this is caused by the feature on the default() implementation.