Skip to content

Commit

Permalink
use older syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
larry0x committed Feb 8, 2023
1 parent 4014255 commit 1a3a944
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 1a3a944

Please sign in to comment.