Skip to content

Commit

Permalink
use older syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
larry0x committed Mar 7, 2023
1 parent 091daaf commit f479316
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/cw2/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,9 @@ pub fn assert_contract_version(
expected_contract: &str,
expected_version: &str,
) -> Result<(), VersionError> {
let Some(ContractVersion { contract, version }) = CONTRACT.may_load(storage)? else {
return Err(VersionError::NotFound);
let ContractVersion { contract, version } = match CONTRACT.may_load(storage)? {
Some(contract) => contract,
None => return Err(VersionError::NotFound),
};

if contract != expected_contract {
Expand Down

0 comments on commit f479316

Please sign in to comment.