Skip to content

Commit

Permalink
Relax aws-sdk dependency versions (#54)
Browse files Browse the repository at this point in the history
Specifying a fixed `0.10` only allows patch updates, which causes issues if trying to use for example `0.12` in a parent project, as handling of major version zero is different to one and up due to semver guarantees. ie. `0.10` is equivalent to `>=0.10.0, <0.11.0` where as `1.10` is equivalent to `>=1.10.0, <2.0.0`.

Also fix a couple minor clippy lints while I'm here.

Signed-off-by: Thomas Farr <xtansia@xtansia.com>
  • Loading branch information
Xtansia authored Jun 1, 2022
1 parent aaab0c7 commit 38c0b67
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions opensearch/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,11 @@ serde = { version = "~1", features = ["derive"] }
serde_json = "~1"
serde_with = "~1"
void = "1.0.2"
aws-sigv4 = { version = "0.10", optional = true }
aws-types = { version = "0.10", optional = true }
aws-sigv4 = { version = ">= 0.10", optional = true }
aws-types = { version = ">= 0.10", optional = true }

[dev-dependencies]
aws-config = "0.10"
aws-config = ">= 0.10"
chrono = { version = "^0.4", features = ["serde"] }
clap = "~2"
failure = "0.1.5"
Expand Down
2 changes: 1 addition & 1 deletion opensearch/src/http/request.rs
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ mod tests {
let mut bytes_mut = BytesMut::with_capacity(21);
let bytes: &'static [u8] = b"{\"foo\":\"bar\",\"baz\":1}";
let _ = bytes.write(&mut bytes_mut)?;
assert_eq!(&bytes[..], &bytes_mut[..]);
assert_eq!(bytes, &bytes_mut[..]);

Ok(())
}
Expand Down
6 changes: 3 additions & 3 deletions opensearch/src/http/response.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ impl Response {
/// Creates a new instance of an Elasticsearch response
pub fn new(response: reqwest::Response, method: Method) -> Self {
Self {
response: response,
method: method,
response,
method,
}
}

Expand Down Expand Up @@ -478,7 +478,7 @@ pub mod tests {
Some("Missing mandatory contexts in context query")
);

assert!(error.additional_details().len() > 0);
assert!(!error.additional_details().is_empty());
assert_eq!(
error.additional_details().get("phase"),
Some(&json!("query"))
Expand Down

0 comments on commit 38c0b67

Please sign in to comment.