Closed larry0x closed 1 year ago
I'd really like to use the let-else syntax, which imo is much nicer:
- let ContractVersion { contract, version } = match CONTRACT.may_load(storage)? {
- Some(contract) => contract,
- None => return Err(VersionError::NotFound),
- };
+ let Some(ContractVersion { contract, version }) = CONTRACT.may_load(storage)? else {
+ return Err(VersionError::NotFound);
+ };
Unfortunately it's only available after Rust 1.65, while CI is still on older versions.
I like it. Thanks @larry0x!
Closes: #857