FuelLabs/sway

Rename storage access methods

Open

Aperta il 4 lug 2023

Vedi su GitHub
 (3 commenti) (0 reazioni) (0 assegnatari)Rust (61.702 star) (5421 fork)batch import
breakingcompiler: uienhancementgood first issuelib: stdstorageteam:compiler

Descrizione

StorageKey's read and try_read are confusing, notably because of errors related to uninitialized storage.

try_read should be the default behavior and there should be extensive documentation of what happens with the storage initialization.

try_read should be renamed to read and read to read_unchecked, but this is a breaking and abrasive change, so we should consider a way of migrating the interface that doesn't startle the users.

Guida contributor