FuelLabs/sway

Rename storage access methods

Open

#4.740 geöffnet am 4. Juli 2023

Auf GitHub ansehen
 (3 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)Rust (5.421 Forks)batch import
breakingcompiler: uienhancementgood first issuelib: stdstorageteam:compiler

Repository-Metriken

Stars
 (61.702 Stars)
PR-Merge-Metriken
 (Durchschn. Merge 5T 4h) (19 gemergte PRs in 30 T)

Beschreibung

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.

Contributor Guide