Skip to content

Commit 8ed95ea

Browse files
authored
chore: replace scale::Encode/Decode by scale::Codec (#1575)
1 parent a4443c1 commit 8ed95ea

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

crates/storage/traits/src/storage.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ use ink_primitives::Key;
1616

1717
/// Trait for representing types which can be read and written to storage.
1818
///
19-
/// This trait is not the same as the `scale::Encode + scale::Decode`. Each type that implements
20-
/// `scale::Encode + scale::Decode` are storable by default and transferable between contracts.
19+
/// This trait is not the same as the [`scale::Codec`]. Each type that implements
20+
/// [`scale::Codec`] are storable by default and transferable between contracts.
2121
/// But not each storable type is transferable.
2222
pub trait Storable: Sized {
2323
/// Convert self to a slice and append it to the destination.
@@ -31,7 +31,7 @@ pub trait Storable: Sized {
3131
/// they can be written directly into the storage cell.
3232
impl<P> Storable for P
3333
where
34-
P: scale::Encode + scale::Decode,
34+
P: scale::Codec,
3535
{
3636
#[inline]
3737
fn encode<T: scale::Output + ?Sized>(&self, dest: &mut T) {
@@ -57,9 +57,9 @@ pub(crate) mod private {
5757
///
5858
/// # Note
5959
///
60-
/// The trait is automatically implemented for types that implement `scale::Encode`
61-
/// and `scale::Decode` via blanket implementation.
62-
pub trait Packed: Storable + scale::Decode + scale::Encode + private::Sealed {}
60+
/// The trait is automatically implemented for types that implement [`scale::Codec`]
61+
/// via blanket implementation.
62+
pub trait Packed: Storable + scale::Codec + private::Sealed {}
6363

6464
/// Holds storage key for the type.
6565
///

0 commit comments

Comments
 (0)