From 85a5a5db13fcaeec8789323344825c68d0e9dd3e Mon Sep 17 00:00:00 2001
From: Muharem Ismailov <ismailov.m.h@gmail.com>
Date: Mon, 27 Feb 2023 17:41:23 +0100
Subject: [PATCH] constructor for MemberRecord (#13473)

---
 substrate/frame/ranked-collective/src/lib.rs | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/substrate/frame/ranked-collective/src/lib.rs b/substrate/frame/ranked-collective/src/lib.rs
index 30bb280a1a4..66af9bf6e0a 100644
--- a/substrate/frame/ranked-collective/src/lib.rs
+++ b/substrate/frame/ranked-collective/src/lib.rs
@@ -170,6 +170,13 @@ pub struct MemberRecord {
 	rank: Rank,
 }
 
+impl MemberRecord {
+	// Constructs a new instance of [`MemberRecord`].
+	pub fn new(rank: Rank) -> Self {
+		Self { rank }
+	}
+}
+
 /// Record needed for every vote.
 #[derive(PartialEq, Eq, Clone, Copy, Encode, Decode, RuntimeDebug, TypeInfo, MaxEncodedLen)]
 pub enum VoteRecord {
-- 
GitLab