Skip to content

Commit

Permalink
style(law): make linter happy
Browse files Browse the repository at this point in the history
  • Loading branch information
amimart committed Mar 23, 2023
1 parent 3a4ede7 commit b21e1c8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
11 changes: 7 additions & 4 deletions contracts/cw-law-stone/src/contract.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,11 +93,11 @@ pub mod reply {
ContractError::InvalidReplyMsg(StdError::generic_err("no message in reply"))
})
.and_then(|e| {
get_reply_event_attribute(e.events, "id".to_string()).ok_or(
get_reply_event_attribute(e.events, "id".to_string()).ok_or_else(|| {
ContractError::InvalidReplyMsg(StdError::generic_err(
"reply event doesn't contains object id",
)),
)
))
})
})
.map(|obj_id| Object {
object_id: obj_id,
Expand Down Expand Up @@ -402,7 +402,10 @@ mod tests {
)
}

assert!(INSTANTIATE_CONTEXT.load(&deps.storage).is_err(), "the instantiate context should be cleaned at the end")
assert!(
INSTANTIATE_CONTEXT.load(&deps.storage).is_err(),
"the instantiate context should be cleaned at the end"
)
}
}

Expand Down
2 changes: 1 addition & 1 deletion contracts/cw-law-stone/src/helper.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ pub fn ask_response_to_objects(
let uris = res
.answer
.map(|a| a.results)
.unwrap_or(vec![])
.unwrap_or_default()
.iter()
.flat_map(|result| result.substitutions.clone())
.filter(|s| s.variable == variable)
Expand Down

0 comments on commit b21e1c8

Please sign in to comment.