expected struct `rusoto_dynamodb::AttributeValue`, found struct `rusoto_dynamodb::generated::AttributeValue`
getmetorajesh opened this issue · comments
Raj commented
looks like the types don't quite match after doing a serde_dynamodb::to_hashmap
sample code,
#[derive(Serialize)]
struct Basic {
i: i32,
f: f32,
}
let value = Basic { i: 5, f: 10.2 };
let putitem = PutItemInput {
table_name: String::from("test"),
item: serde_dynamodb::to_hashmap(&value).unwrap(),
..Default::default()
};
Error:
expected struct `rusoto_dynamodb::AttributeValue`, found struct `rusoto_dynamodb::generated::AttributeValue`
Raj commented
turns out the I was using older version(0.1) as said in crates.io whereas 0.2.0
is the latest version. This PR should fix
François Mockers commented
Thanks !
Blaine Price commented
Hi, I'm seeing something similar now.
If in Cargo.toml I use the most recent version of rusoto:
rusoto_core = "0.42.0"
rusoto_dynamodb = "0.42.0"
serde_dynamodb = "0.4.0"
I get the above error.
Output of cargo tree
After reverting to an earlier version of rusoto, the error is cleared.
rusoto_core = "0.40.0"
rusoto_dynamodb = "0.40.0"
serde_dynamodb = "0.4.0"
François Mockers commented
@wbprice just published version 0.4.1 with updated rusoto dependency (0.42)