mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-19 13:31:04 +00:00
Use Incrementable from frame_support::traits (#14367)
* Use Incrementable from frame_support::traits * Chore
This commit is contained in:
@@ -15,25 +15,6 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
macro_rules! impl_incrementable {
|
||||
($($type:ty),+) => {
|
||||
$(
|
||||
impl Incrementable for $type {
|
||||
fn increment(&self) -> Self {
|
||||
let mut val = self.clone();
|
||||
val.saturating_inc();
|
||||
val
|
||||
}
|
||||
|
||||
fn initial_value() -> Self {
|
||||
0
|
||||
}
|
||||
}
|
||||
)+
|
||||
};
|
||||
}
|
||||
pub(crate) use impl_incrementable;
|
||||
|
||||
macro_rules! impl_codec_bitflags {
|
||||
($wrapper:ty, $size:ty, $bitflag_enum:ty) => {
|
||||
impl MaxEncodedLen for $wrapper {
|
||||
|
||||
Reference in New Issue
Block a user