Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade uuid to version 1.1.2 #170

Open
wants to merge 12 commits into
base: master
Choose a base branch
from
8 changes: 4 additions & 4 deletions dynomite/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ futures = "0.3"
log = "0.4"
# Disable default features since the `rustls` variant requires it. We re-enable `default` in our
# `default` build configuration - see the [features] below.
rusoto_core = { version = "0.47", optional = true, default_features = false }
rusoto_dynamodb = { version = "0.47", optional = true, default_features = false }
uuid = { version = "0.8", features = ["v4"], optional = true }
rusoto_core = { git = "https://github.com/getditto/rusoto.git", rev = "a167fb4fd2d0b3b3f8d191d1d905fe8a60f66a3a", optional = true, default_features = false }
rusoto_dynamodb = { git = "https://github.com/getditto/rusoto.git", rev = "a167fb4fd2d0b3b3f8d191d1d905fe8a60f66a3a", version = "0.48", optional = true, default_features = false }
uuid = { version = "1.1.2", features = ["v4"], optional = true }
chrono = { version = "0.4", optional = true }

[dev-dependencies]
Expand All @@ -36,7 +36,7 @@ maplit = "1.0"
serde = "1.0"
serde_json = "1.0"
tokio = { version = "1", features = ["macros"] }
lambda_http = { git = "https://github.com/awslabs/aws-lambda-rust-runtime/", branch = "master"}
lambda_http = "0.5.2"
trybuild = "1.0"
rustversion = "1.0"
dynomite-derive = { version = "0.10.0", path = "../dynomite-derive" } # required by trybuild
Expand Down
4 changes: 2 additions & 2 deletions dynomite/examples/lambda.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ use dynomite::{
retry::Policy,
Retries,
};
use lambda_http::{handler, lambda_runtime};
use lambda_http::service_fn;

type Error = Box<dyn std::error::Error + Send + Sync + 'static>;

#[tokio::main]
async fn main() -> Result<(), Error> {
let client = DynamoDbClient::new(Default::default()).with_retries(Policy::default());

lambda_runtime::run(handler(move |_, _| {
lambda_http::run(service_fn(move |_| {
let client = client.clone();
async move {
let tables = client
Expand Down
2 changes: 1 addition & 1 deletion dynomite/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -683,7 +683,7 @@ impl<T: IntoAttributes + FromAttributes> Attribute for T {
impl Attribute for Uuid {
fn into_attr(self) -> AttributeValue {
AttributeValue {
s: Some(self.to_hyphenated().to_string()),
s: Some(self.hyphenated().to_string()),
..AttributeValue::default()
}
}
Expand Down
2 changes: 1 addition & 1 deletion dynomite/trybuild-tests/fail/fat-enum-without-tag.stderr
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
error: #[derive(Attributes)] for fat enums must have a sibling #[dynomite(tag = "key")] attribute to specify the descriptor field name.

= note: Only internally tagged enums are supported in this version of dynomite.
= note: Only internally tagged enums are supported in this version of dynomite.

--> $DIR/fat-enum-without-tag.rs:4:10
|
Expand Down
14 changes: 9 additions & 5 deletions dynomite/trybuild-tests/fail/item-not-on-struct-fail.stderr
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
error[E0774]: `derive` may only be applied to structs, enums and unions
--> $DIR/item-not-on-struct-fail.rs:7:1
|
7 | #[derive(dynomite_derive::Item)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0774]: `derive` may only be applied to `struct`s, `enum`s and `union`s
--> $DIR/item-not-on-struct-fail.rs:7:1
|
7 | #[derive(dynomite_derive::Item)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not applicable here
8 | / fn fail() {
9 | | println!("This should fail");
10 | | }
| |_- not a `struct`, `enum` or `union`
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
error: Duplicate tag name detected: `Bar`

= help: Please ensure that no `rename = "tag_value"` clauses conflict with each other and remaining enum variants' names
= help: Please ensure that no `rename = "tag_value"` clauses conflict with each other and remaining enum variants' names

--> $DIR/non-unique-fat-enum-tags.rs:8:5
|
Expand Down
Loading