Unverified Commit 4b5d91a8 authored by Robin Freyler's avatar Robin Freyler Committed by GitHub
Browse files

Add SpreadAllocate and PackedAllocate traits and impls (#978)

* improve docs of PackedLayout methods

* add SpreadAllocate trait

Note: We cannot add allocate_spread to SpreadLayout trait since certain types (such as Result<T, E>) that implement SpreadLayout cannot implement SpreadAllocate; OR certain types can trivially implement SpreadLayout but are constraint with respect to SpreadAllocate and vice versa.

* add PackedAllocate trait

* add utility methods for SpreadAllocate and PackedAllocate traits

* improve macro hygiene of some trait impl code dupe macros

* normalize some import statement

* apply rustfmt

* implement {Spread,Packed}Allocate traits for primitive and prelude types

* implement {Packed,Spread}Allocate for std collections

* implement {Packed,Spread}Allocate for array primitives

* improve Codec impl for ink_storage::Pack<T>

* add {Packed,Spread}Allocate impl for ink_storage::Pack<T>

* add {Packed,Spread}Allocate impl for ink_storage::Memory

* add missing #[inline] annotations to ink_storage::Memory<T>

* implement {Packed,Spread}Allocate for tuple types

* add {Spread,Packed}Allocate impl for lazy storage abstractions

* add some #[inline] annotations

* add SpreadAllocate impl for Lazy<T>

* add SpreadAllocate impl for StorageVec

* add SpreadAllocate impl for StorageStash

* derive Default for Header

* remove unused import

* implement SpreadAllocate for the rest of the ink! storage collections
parent 4534c4a1
Pipeline #163474 failed with stages
in 12 minutes and 50 seconds