diff --git a/src/interner.rs b/src/interner.rs index b8667b8a..521cd674 100644 --- a/src/interner.rs +++ b/src/interner.rs @@ -57,17 +57,6 @@ pub struct UntrackedSymbol { marker: PhantomData T>, } -impl UntrackedSymbol { - /// Returns the index to the symbol in the interner table. - #[deprecated( - since = "2.5.0", - note = "Prefer to access the fields directly; this getter will be removed in the next major version" - )] - pub fn id(&self) -> u32 { - self.id - } -} - impl From for UntrackedSymbol { fn from(id: u32) -> Self { Self { diff --git a/src/portable.rs b/src/portable.rs index 133f0594..ece6dd70 100644 --- a/src/portable.rs +++ b/src/portable.rs @@ -73,15 +73,6 @@ impl PortableRegistry { self.types.get(id as usize).map(|ty| &ty.ty) } - /// Returns all types with their associated identifiers. - #[deprecated( - since = "2.5.0", - note = "Prefer to access the fields directly; this getter will be removed in the next major version" - )] - pub fn types(&self) -> &[PortableType] { - &self.types - } - /// Retains only the portable types needed to express the provided ids. /// /// The type IDs retained are returned as key to the [`BTreeMap`]. @@ -249,24 +240,6 @@ impl PortableType { pub fn new(id: u32, ty: Type) -> Self { Self { id, ty } } - - /// Returns the index of the [`PortableType`]. - #[deprecated( - since = "2.5.0", - note = "Prefer to access the fields directly; this getter will be removed in the next major version" - )] - pub fn id(&self) -> u32 { - self.id - } - - /// Returns the type of the [`PortableType`]. - #[deprecated( - since = "2.5.0", - note = "Prefer to access the fields directly; this getter will be removed in the next major version" - )] - pub fn ty(&self) -> &Type { - &self.ty - } } /// Construct a [`PortableRegistry`]. diff --git a/src/ty/composite.rs b/src/ty/composite.rs index 8bd48b6e..0f3cf3c5 100644 --- a/src/ty/composite.rs +++ b/src/ty/composite.rs @@ -104,17 +104,3 @@ where } } } - -impl TypeDefComposite -where - T: Form, -{ - /// Returns the fields of the composite type. - #[deprecated( - since = "2.5.0", - note = "Prefer to access the fields directly; this getter will be removed in the next major version" - )] - pub fn fields(&self) -> &[Field] { - &self.fields - } -} diff --git a/src/ty/fields.rs b/src/ty/fields.rs index f99faea6..27532e3c 100644 --- a/src/ty/fields.rs +++ b/src/ty/fields.rs @@ -136,48 +136,3 @@ where } } } - -impl Field -where - T: Form, -{ - /// Returns the name of the field. None for unnamed fields. - #[deprecated( - since = "2.5.0", - note = "Prefer to access the fields directly; this getter will be removed in the next major version" - )] - pub fn name(&self) -> Option<&T::String> { - self.name.as_ref() - } - - /// Returns the type of the field. - #[deprecated( - since = "2.5.0", - note = "Prefer to access the fields directly; this getter will be removed in the next major version" - )] - pub fn ty(&self) -> &T::Type { - &self.ty - } - - /// Returns a string which is the name of the type of the field as it - /// appears in the source code. The exact contents and format of the type - /// name are not specified, but in practice will be the name of any valid - /// type for a field. This is intended for informational and diagnostic - /// purposes only. - #[deprecated( - since = "2.5.0", - note = "Prefer to access the fields directly; this getter will be removed in the next major version" - )] - pub fn type_name(&self) -> Option<&T::String> { - self.type_name.as_ref() - } - - /// Returns the documentation of the field. - #[deprecated( - since = "2.5.0", - note = "Prefer to access the fields directly; this getter will be removed in the next major version" - )] - pub fn docs(&self) -> &[T::String] { - &self.docs - } -} diff --git a/src/ty/mod.rs b/src/ty/mod.rs index 5843c372..be1d5837 100644 --- a/src/ty/mod.rs +++ b/src/ty/mod.rs @@ -157,47 +157,6 @@ where } } -impl Type -where - T: Form, -{ - /// Returns the path of the type - #[deprecated( - since = "2.5.0", - note = "Prefer to access the fields directly; this getter will be removed in the next major version" - )] - pub fn path(&self) -> &Path { - &self.path - } - - /// Returns the generic type parameters of the type - #[deprecated( - since = "2.5.0", - note = "Prefer to access the fields directly; this getter will be removed in the next major version" - )] - pub fn type_params(&self) -> &[TypeParameter] { - &self.type_params - } - - /// Returns the definition of the type - #[deprecated( - since = "2.5.0", - note = "Prefer to access the fields directly; this getter will be removed in the next major version" - )] - pub fn type_def(&self) -> &TypeDef { - &self.type_def - } - - /// Returns the documentation of the type - #[deprecated( - since = "2.5.0", - note = "Prefer to access the fields directly; this getter will be removed in the next major version" - )] - pub fn docs(&self) -> &[T::String] { - &self.docs - } -} - /// A generic type parameter. #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] #[cfg_attr( @@ -251,31 +210,6 @@ impl TypeParameter { } } -impl TypeParameter -where - T: Form, -{ - /// Get the type of the parameter. - /// - /// `None` if the parameter is skipped. - #[deprecated( - since = "2.5.0", - note = "Prefer to access the fields directly; this getter will be removed in the next major version" - )] - pub fn ty(&self) -> Option<&T::Type> { - self.ty.as_ref() - } - - /// Get the name of the parameter. - #[deprecated( - since = "2.5.0", - note = "Prefer to access the fields directly; this getter will be removed in the next major version" - )] - pub fn name(&self) -> &T::String { - &self.name - } -} - /// The possible types a SCALE encodable Rust value could have. /// /// # Note @@ -399,9 +333,6 @@ pub enum TypeDefPrimitive { /// `u128` #[codec(index = 7)] U128, - /// 256 bits unsigned int (no rust equivalent) - #[codec(index = 8)] - U256, /// `i8` #[codec(index = 9)] I8, @@ -417,9 +348,6 @@ pub enum TypeDefPrimitive { /// `i128` #[codec(index = 13)] I128, - /// 256 bits signed int (no rust equivalent) - #[codec(index = 14)] - I256, } /// An array type. @@ -455,24 +383,6 @@ where pub fn new(len: u32, type_param: ::Type) -> Self { Self { len, type_param } } - - /// Returns the length of the array type. - #[deprecated( - since = "2.5.0", - note = "Prefer to access the fields directly; this getter will be removed in the next major version" - )] - pub fn len(&self) -> u32 { - self.len - } - - /// Returns the element type of the array type. - #[deprecated( - since = "2.5.0", - note = "Prefer to access the fields directly; this getter will be removed in the next major version" - )] - pub fn type_param(&self) -> &T::Type { - &self.type_param - } } /// A type to refer to tuple types. @@ -535,20 +445,6 @@ impl TypeDefTuple { } } -impl TypeDefTuple -where - T: Form, -{ - /// Returns the types of the tuple fields. - #[deprecated( - since = "2.5.0", - note = "Prefer to access the fields directly; this getter will be removed in the next major version" - )] - pub fn fields(&self) -> &[T::Type] { - &self.fields - } -} - /// A type to refer to a sequence of elements of the same type. #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] #[cfg_attr(any(feature = "std", feature = "decode"), derive(scale::Decode))] @@ -593,15 +489,6 @@ where pub fn new(type_param: ::Type) -> Self { Self { type_param } } - - /// Returns the element type of the sequence type. - #[deprecated( - since = "2.5.0", - note = "Prefer to access the fields directly; this getter will be removed in the next major version" - )] - pub fn type_param(&self) -> &T::Type { - &self.type_param - } } /// A type wrapped in [`Compact`]. @@ -633,15 +520,6 @@ where pub fn new(type_param: ::Type) -> Self { Self { type_param } } - - /// Returns the [`Compact`] wrapped type, i.e. the `T` in `Compact`. - #[deprecated( - since = "2.5.0", - note = "Prefer to access the fields directly; this getter will be removed in the next major version" - )] - pub fn type_param(&self) -> &T::Type { - &self.type_param - } } /// Type describing a [`bitvec::vec::BitVec`]. @@ -672,29 +550,6 @@ impl IntoPortable for TypeDefBitSequence { } } -impl TypeDefBitSequence -where - T: Form, -{ - /// Returns the type of the bit ordering of the [`::bitvec::vec::BitVec`]. - #[deprecated( - since = "2.5.0", - note = "Prefer to access the fields directly; this getter will be removed in the next major version" - )] - pub fn bit_order_type(&self) -> &T::Type { - &self.bit_order_type - } - - /// Returns underlying type used to store the [`::bitvec::vec::BitVec`]. - #[deprecated( - since = "2.5.0", - note = "Prefer to access the fields directly; this getter will be removed in the next major version" - )] - pub fn bit_store_type(&self) -> &T::Type { - &self.bit_store_type - } -} - impl TypeDefBitSequence { /// Creates a new [`TypeDefBitSequence`] for the supplied bit order and bit store types. /// diff --git a/src/ty/path.rs b/src/ty/path.rs index 574e83c7..630310ac 100644 --- a/src/ty/path.rs +++ b/src/ty/path.rs @@ -158,15 +158,6 @@ where } } - /// Returns the segments of the Path - #[deprecated( - since = "2.5.0", - note = "Prefer to access the fields directly; this getter will be removed in the next major version" - )] - pub fn segments(&self) -> &[T::String] { - &self.segments - } - /// Returns `true` if the path is empty pub fn is_empty(&self) -> bool { self.segments.is_empty() diff --git a/src/ty/variant.rs b/src/ty/variant.rs index a647018e..8aa63001 100644 --- a/src/ty/variant.rs +++ b/src/ty/variant.rs @@ -117,20 +117,6 @@ where } } -impl TypeDefVariant -where - T: Form, -{ - /// Returns the variants of a variant type - #[deprecated( - since = "2.5.0", - note = "Prefer to access the fields directly; this getter will be removed in the next major version" - )] - pub fn variants(&self) -> &[Variant] { - &self.variants - } -} - /// A struct enum variant with either named (struct) or unnamed (tuple struct) /// fields. /// @@ -212,44 +198,3 @@ where } } } - -impl Variant -where - T: Form, -{ - /// Returns the name of the variant. - #[deprecated( - since = "2.5.0", - note = "Prefer to access the fields directly; this getter will be removed in the next major version" - )] - pub fn name(&self) -> &T::String { - &self.name - } - - /// Returns the fields of the struct variant. - #[deprecated( - since = "2.5.0", - note = "Prefer to access the fields directly; this getter will be removed in the next major version" - )] - pub fn fields(&self) -> &[Field] { - &self.fields - } - - /// Returns the index of the variant. - #[deprecated( - since = "2.5.0", - note = "Prefer to access the fields directly; this getter will be removed in the next major version" - )] - pub fn index(&self) -> u8 { - self.index - } - - /// Returns the documentation of the variant. - #[deprecated( - since = "2.5.0", - note = "Prefer to access the fields directly; this getter will be removed in the next major version" - )] - pub fn docs(&self) -> &[T::String] { - &self.docs - } -}