forc version 0.34.0 is officially out! There are many new enhancements and some breaking changes, including:
- It is no longer allowed to instantiate
enumvariants of unit type using parentheses. For example,Option::None()is now a compile error and should be replaced withOption::None. - The function
std::storage::get(key: b256)now returns anOption. If no value was previously stored at the key,Option::Noneis returned. Otherwise,Option::Some(value)is returned, wherevalueis the value previously stored atkey. - The method
StorageMap::get(self, key: K)now returns anOption. If no value was previously stored atkey,Option::Noneis returned. Otherwise,Option::Some(value)is returned, wherevalueis the value previously stored atkey. - The methods
splitandjoinofstd::bytes::Byteshave been renamed tosplit_atandappend. - The trait
std::math::Exponentiatehas been renamed tostd::math::Power.
You can check out the full release notes on GitHub: