FuelLabs/sway

Rename storage access methods

Aberta

#4.740 aberto em 4 de jul. de 2023

 (3 comentários) (0 reação) (0 responsável)Rust (5.421 forks)batch import
breakingcompiler: uienhancementgood first issuelib: stdstorageteam:compiler

Métricas do repositório

Stars
 (61.702 estrelas)
Métricas de merge de PR
 (Mesclagem média 22h 6m) (16 fundiu PRs em 30d)

Description

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.

Guia do colaborador