Skip to content

Commit

Permalink
fix: clippy error (#40)
Browse files Browse the repository at this point in the history
  • Loading branch information
bokuweb authored Jul 8, 2020
1 parent 173f995 commit 33be7c8
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions raiden-derive/src/ops/update.rs
Original file line number Diff line number Diff line change
Expand Up @@ -200,13 +200,14 @@ pub(crate) fn expand_update_item(
let has_return_values = self.input.return_values.is_some();
let res = self.client.update_item(self.input).await?;

let mut item: Option<#struct_name> = None;
if has_return_values {
let item = if has_return_values {
let res_item = &res.attributes.unwrap();
item = Some(#struct_name {
Some(#struct_name {
#(#from_item)*
});
}
})
} else {
None
};

Ok(::raiden::update::UpdateOutput {
item,
Expand Down

0 comments on commit 33be7c8

Please sign in to comment.